Commit ad4c3c68 authored by Reuben Martin's avatar Reuben Martin Committed by Baptiste Coudurier

In gxf muxer, fix flt entry offset, patch by Reuben Martin, reuben dot m at gmail dot com

Originally committed as revision 25395 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e99179de
......@@ -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
}
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment