In gxf muxer, fix flt entry offset, patch by Reuben Martin, reuben dot m at gmail...
authorReuben Martin <reuben.m@gmail.com>
Thu, 7 Oct 2010 19:15:35 +0000 (19:15 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 7 Oct 2010 19:15:35 +0000 (19:15 +0000)
Originally committed as revision 25395 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/gxfenc.c
tests/ref/lavf/gxf

index 55bba21..fe286e2 100644 (file)
@@ -859,6 +859,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
     AVStream *st = s->streams[pkt->stream_index];
     int64_t pos = url_ftell(pb);
     int padding = 0;
+    int packet_start_offset = url_ftell(pb) / 1024;
 
     gxf_write_packet_header(pb, PKT_MEDIA);
     if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
@@ -878,7 +879,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
                 return -1;
             }
         }
-        gxf->flt_entries[gxf->flt_entries_nb++] = url_ftell(pb) / 1024;
+        gxf->flt_entries[gxf->flt_entries_nb++] = packet_start_offset;
         gxf->nb_fields += 2; // count fields
     }
 
index 5dc3ea7..84cb40d 100644 (file)
@@ -1,3 +1,3 @@
-5b9c8da067585aeb04e5fb31e021cbfd *./tests/data/lavf/lavf.gxf
+8e4802de8e1f0d2f9498b6afa16f7cdf *./tests/data/lavf/lavf.gxf
 796392 ./tests/data/lavf/lavf.gxf
 ./tests/data/lavf/lavf.gxf CRC=0xad9e86eb