1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

do not reset ffm pts, this avoids setting last pts to 0 and screwing up seeking

Originally committed as revision 13856 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-06-22 00:26:25 +00:00
parent 60a04f7fc9
commit 54e5cf132d
3 changed files with 11 additions and 12 deletions

View File

@ -47,7 +47,6 @@ static void flush_packet(AVFormatContext *s)
/* prepare next packet */
ffm->frame_offset = 0; /* no key frame */
ffm->pts = 0; /* no pts */
ffm->packet_ptr = ffm->packet;
ffm->first_packet = 0;
}
@ -60,10 +59,10 @@ static void ffm_write_data(AVFormatContext *s,
FFMContext *ffm = s->priv_data;
int len;
if (header && ffm->frame_offset == 0)
if (header && ffm->frame_offset == 0) {
ffm->frame_offset = ffm->packet_ptr - ffm->packet + FFM_HEADER_SIZE;
if (header && ffm->pts == 0)
ffm->pts = pts;
}
/* write as many packets as needed */
while (size > 0) {

View File

@ -1,10 +1,10 @@
18c4ba0e8e7adb781216e38de61c2e39 ff-test_h.avi
4f11d850f564af3359951b46ed1e571e ff-test_l.avi
59c7b9ea84ea3d0e9fed64340f06a3d8 ff-test.swf
7869c3c4173745faa19dbc70fb199bb9 ff-test_h.asf
7367fd8c4dc4253af98c66df318e5307 ff-test_l.asf
76180cc972bd4bd46bc9104c82c971d9 ff-test_h.rm
edc63f73e1cd02841e3120b03c8133d6 ff-test_l.rm
d41d8cd98f00b204e9800998ecf8427e ff-test.jpg
d41d8cd98f00b204e9800998ecf8427e ff-test_small.jpg
dad98a8937cdbf7e57cef745d5558970 ff-test.mjpg
d976848a9e4d5d8fc2659e4841cdece5 ff-test.swf
37ccf79cb3a50fda99173e5ba4b44d55 ff-test_h.asf
3e2bff2fda1fe2ed334e639aa6839f0c ff-test_l.asf
60550d751dfa5172d878f7dd670e3aa4 ff-test_h.rm
6218946abd1c4af92f05a8a6208b1e1c ff-test_l.rm
e0dc91430660c619e97b5c82e0f398fc ff-test.jpg
84b9702e34b9e21a84bb29519fc1e3cc ff-test_small.jpg
a22cc793b9f938cc05cd0c56ccf9423c ff-test.mjpg

View File

@ -15,7 +15,7 @@ bdb7484c68db722f66ba1630cf79844c *./tests/data/b-libav.mpg
d6fdeb9f7083cc827f9510c6c4517dc0 *./tests/data/b-libav.swf
335771 ./tests/data/b-libav.swf
./tests/data/b-libav.swf CRC=0xe14e8847
bbdd9a4904eceb530b1a9ae02c48d76f *./tests/data/b-libav.ffm
bbdf0d67ad1035d59adc3c4cd245f3a9 *./tests/data/b-libav.ffm
380928 ./tests/data/b-libav.ffm
./tests/data/b-libav.ffm CRC=0x2b71a386
f8ad5bd78f4d012a8ce9570aa395ac54 *./tests/data/b-libav.flv