[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[340] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-12 10:34:40
|
Revision: 340 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=340&view=rev Author: nickols_k Date: 2012-11-12 10:34:29 +0000 (Mon, 12 Nov 2012) Log Message: ----------- add still one additional test Modified Paths: -------------- mplayerxp/libmpdemux/demuxer_r.h mplayerxp/mplayerxp.c mplayerxp/mplayerxp.h mplayerxp/osdep/mp_malloc.c mplayerxp/osdep/mplib.h mplayerxp/postproc/postprocess.c mplayerxp/xmpcore/xmp_vdecoder.c Modified: mplayerxp/libmpdemux/demuxer_r.h =================================================================== --- mplayerxp/libmpdemux/demuxer_r.h 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/libmpdemux/demuxer_r.h 2012-11-12 10:34:29 UTC (rev 340) @@ -12,7 +12,7 @@ #endif typedef enum enc_frame_type { - AudioFrame =0, + AudioFrame=1, VideoFrame }enc_frame_type_e; Modified: mplayerxp/mplayerxp.c =================================================================== --- mplayerxp/mplayerxp.c 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/mplayerxp.c 2012-11-12 10:34:29 UTC (rev 340) @@ -343,7 +343,7 @@ MP_UNIT(NULL); } -void exit_player(char* how){ +void exit_player(const char* why){ fflush(stdout); fflush(stderr); @@ -352,12 +352,12 @@ MP_UNIT("exit_player"); sws_uninit(); - if(how) MSG_HINT(MSGTR_Exiting,how); + if(why) MSG_HINT(MSGTR_Exiting,why); MSG_DBG2("max framesize was %d bytes\n",max_framesize); if(mp_data->mconfig) m_config_free(mp_data->mconfig); mp_msg_uninit(); mpxp_uninit_structs(); - if(how) exit(0); + if(why) exit(0); return; /* Still try coredump!!!*/ } Modified: mplayerxp/mplayerxp.h =================================================================== --- mplayerxp/mplayerxp.h 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/mplayerxp.h 2012-11-12 10:34:29 UTC (rev 340) @@ -4,6 +4,7 @@ #include <pthread.h> #include <stdint.h> #include "mp_config.h" +#include "osdep/mplib.h" typedef struct mp_conf_s { int has_video; @@ -115,7 +116,12 @@ extern pthread_mutex_t audio_timer_mutex; -extern void exit_player(char* how); +extern void exit_player(const char* why); +static inline void escape_player(const char* why,unsigned num_calls) { + show_backtrace(why,num_calls); + exit_player(why); +} + extern void mpxp_resync_audio_stream(void); extern void mpxp_reset_vcache(void); extern void __exit_sighandler(void); Modified: mplayerxp/osdep/mp_malloc.c =================================================================== --- mplayerxp/osdep/mp_malloc.c 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/osdep/mp_malloc.c 2012-11-12 10:34:29 UTC (rev 340) @@ -12,7 +12,6 @@ #include <limits.h> #include <time.h> #include <unistd.h> -#include <execinfo.h> typedef struct mp_slot_s { any_t* page_ptr; @@ -186,7 +185,15 @@ uninit_bt_cache(cache); } -void print_backtrace(unsigned num) { __print_backtrace(num); } +void print_backtrace(const char *why,any_t** stack,unsigned num) { + bt_cache_t* cache=init_bt_cache(); + unsigned i; + MSG_INFO(why?why:"*** Backtrace for suspect call ***\n"); + for(i=0;i<num;i++) { + MSG_INFO(" %p -> %s\n",stack[i],addr2line(cache,stack[i])); + } + uninit_bt_cache(cache); +} static void __prot_free_append(any_t*ptr) { any_t *page_ptr=prot_page_align(ptr); Modified: mplayerxp/osdep/mplib.h =================================================================== --- mplayerxp/osdep/mplib.h 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/osdep/mplib.h 2012-11-12 10:34:29 UTC (rev 340) @@ -8,6 +8,7 @@ */ #ifndef __MPLIB_H_INCLUDED__ #define __MPLIB_H_INCLUDED__ 1 +#include <execinfo.h> #include <stddef.h> #include <sys/mman.h> #include "mp_config.h" @@ -62,5 +63,13 @@ }; extern int __FASTCALL__ mp_mprotect(const any_t* addr,size_t len,enum mp_prot_e flags); -extern void print_backtrace(unsigned num); +extern void print_backtrace(const char *why,any_t** stack,unsigned num); + +static inline void show_backtrace(const char *why,unsigned num_calls) { + any_t* stack[num_calls]; + unsigned ncalls; + ncalls=backtrace(stack,num_calls); + print_backtrace(why,stack,ncalls); +} + #endif Modified: mplayerxp/postproc/postprocess.c =================================================================== --- mplayerxp/postproc/postprocess.c 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/postproc/postprocess.c 2012-11-12 10:34:29 UTC (rev 340) @@ -13,7 +13,6 @@ #define MSGT_CLASS MSGT_PP #include "mp_msg.h" -extern void exit_player(char *); pp_context *pp2_get_context(int width, int height, int flags) { flags &= 0x00FFFFFFUL; /* kill cpu related flags */ Modified: mplayerxp/xmpcore/xmp_vdecoder.c =================================================================== --- mplayerxp/xmpcore/xmp_vdecoder.c 2012-11-12 09:54:33 UTC (rev 339) +++ mplayerxp/xmpcore/xmp_vdecoder.c 2012-11-12 10:34:29 UTC (rev 340) @@ -188,6 +188,7 @@ if(cur_time - mp_data->seek_time > (xp_core->num_v_buffs/sh_video->fps)*100) xp_n_frame_to_drop=compute_frame_dropping(sh_video,frame->pts,drop_barrier); } /* if( mp_conf.frame_dropping ) */ if(!finite(frame->pts)) MSG_WARN("Bug of demuxer! Value of video pts=%f\n",frame->pts); + if(frame->type!=VideoFrame) escape_player("VideoDecoder doesn't parse non video frames",10); #if 0 /* We can't seriously examine question of too slow machines This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |