diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-10-12 21:30:03 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-10-12 21:30:03 +0000 |
commit | 15299b3821bff66ab89895c95cc06d0908f8ec7b (patch) | |
tree | 6848af47a4dcab535b775f5eefbbfc2dddbe071b /libavformat/oggdec.c | |
parent | 933e8667350b118d9fda540e73bfae59e09b925b (diff) | |
download | ffmpeg-15299b3821bff66ab89895c95cc06d0908f8ec7b.tar.gz |
Calculate correct packet durations when demuxing Ogg/Speex. This involves
determining if there is any delay in the first packet and/or any truncation in
the final packet.
Originally committed as revision 20216 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r-- | libavformat/oggdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index adf0ad051c..129268b390 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -380,6 +380,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize) if (os->header > -1 && os->seq > os->header){ os->pflags = 0; + os->pduration = 0; if (os->codec && os->codec->packet) os->codec->packet (s, idx); if (str) @@ -524,6 +525,7 @@ ogg_read_packet (AVFormatContext * s, AVPacket * pkt) } pkt->flags = os->pflags; + pkt->duration = os->pduration; return psize; } |