# HG changeset patch # User arpi # Date 1010627989 0 # Node ID aca490499e1f625e873ccae803d27cd84dfaef25 # Parent 5f28d9d7d34625a464c209bae20e5d349ec3701b added mpeg userdata dump diff -r 5f28d9d7d346 -r aca490499e1f libmpdemux/video.c --- a/libmpdemux/video.c Thu Jan 10 01:42:31 2002 +0000 +++ b/libmpdemux/video.c Thu Jan 10 01:59:49 2002 +0000 @@ -164,6 +164,15 @@ 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=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 @@ //videobuf_len=0; while(videobuf_len=0x1B0){ // not slice code -> end of frame #if 1 @@ -204,8 +214,9 @@ //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; } }