diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-10 01:59:49 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-10 01:59:49 +0000 |
commit | 30dd20f2124bda9bcc0a3228ad4791ce71f38c25 (patch) | |
tree | 2f0934c78d042140778a47d68e47547a55272d87 /libmpdemux | |
parent | 180ae10466de2b986d159b463697aa5837a54164 (diff) |
added mpeg userdata dump
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4075 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/video.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 14aaff2f55..f9b624dbe8 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -164,6 +164,15 @@ switch(d_video->demuxer->file_format){ return 1; } +static void process_userdata(unsigned char* buf,int len){ + int i; + printf( "user_data: len=%3d %02X %02X %02X %02X '", + len, buf[0], buf[1], buf[2], buf[3]); + for(i=0;i<len;i++) + if(buf[i]>=32 && buf[i]<127) putchar(buf[i]); + printf("'\n"); +} + int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps){ demux_stream_t *d_video=sh_video->ds; demuxer_t *demuxer=d_video->demuxer; @@ -180,7 +189,8 @@ int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** //videobuf_len=0; while(videobuf_len<VIDEOBUFFER_SIZE-MAX_VIDEO_PACKET_SIZE){ int i=sync_video_packet(d_video); - void* buffer=&videobuffer[videobuf_len+4]; + //void* buffer=&videobuffer[videobuf_len+4]; + int start=videobuf_len+4; if(in_frame){ if(i<0x101 || i>=0x1B0){ // not slice code -> end of frame #if 1 @@ -204,8 +214,9 @@ int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** //printf("read packet 0x%X, len=%d\n",i,videobuf_len); // process headers: switch(i){ - case 0x1B3: mp_header_process_sequence_header (&picture, buffer);break; - case 0x1B5: mp_header_process_extension (&picture, buffer);break; + case 0x1B3: mp_header_process_sequence_header (&picture, &videobuffer[start]);break; + case 0x1B5: mp_header_process_extension (&picture, &videobuffer[start]);break; + case 0x1B2: if(verbose) process_userdata (&videobuffer[start], videobuf_len-start);break; } } |