[FFmpeg-cvslog] r17953 - trunk/libavformat/swfdec.c

reimar subversion
Fri Mar 13 23:26:45 CET 2009


Author: reimar
Date: Fri Mar 13 23:26:45 2009
New Revision: 17953

Log:
Set pkt->pos correctly (to the start of header of the packet) in swfdec.

Modified:
   trunk/libavformat/swfdec.c

Modified: trunk/libavformat/swfdec.c
==============================================================================
--- trunk/libavformat/swfdec.c	Fri Mar 13 20:37:05 2009	(r17952)
+++ trunk/libavformat/swfdec.c	Fri Mar 13 23:26:45 2009	(r17953)
@@ -87,6 +87,7 @@ static int swf_read_packet(AVFormatConte
     int tag, len, i, frame, v;
 
     for(;;) {
+        uint64_t pos = url_ftell(pb);
         tag = get_swf_tag(pb, &len);
         if (tag < 0)
             return AVERROR(EIO);
@@ -148,6 +149,7 @@ static int swf_read_packet(AVFormatConte
                 if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) {
                     frame = get_le16(pb);
                     av_get_packet(pb, pkt, len-2);
+                    pkt->pos = pos;
                     pkt->pts = frame;
                     pkt->stream_index = st->index;
                     return pkt->size;
@@ -163,6 +165,7 @@ static int swf_read_packet(AVFormatConte
             } else { // ADPCM, PCM
                 av_get_packet(pb, pkt, len);
             }
+            pkt->pos = pos;
             pkt->stream_index = st->index;
             return pkt->size;
                 }
@@ -195,6 +198,7 @@ static int swf_read_packet(AVFormatConte
             } else {
                 get_buffer(pb, pkt->data + 4, pkt->size - 4);
             }
+            pkt->pos = pos;
             pkt->stream_index = st->index;
             return pkt->size;
         }




More information about the ffmpeg-cvslog mailing list