Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-04-12 23:55:46 +0400
committerAnton Khirnov <anton@khirnov.net>2014-04-22 09:45:49 +0400
commit1ae8198bca749a0cff205196cc83d35b9962849b (patch)
tree88748d46756e51d892d757af25000eb6fb89b10a /avconv.c
parentb19a5e51981be5b69cf550a3bc17fe5300d0dbc9 (diff)
avconv: always reset packet pts after decoding an audio frame
Currently, if a decoder sets AVFrame.pts, we'd send the same timestamp to it twice, which is wrong.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/avconv.c b/avconv.c
index 866b90ca7d..79d5e67303 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1175,10 +1175,9 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
the decoder could be delaying output by a packet or more. */
if (decoded_frame->pts != AV_NOPTS_VALUE)
ist->next_dts = decoded_frame->pts;
- else if (pkt->pts != AV_NOPTS_VALUE) {
+ else if (pkt->pts != AV_NOPTS_VALUE)
decoded_frame->pts = pkt->pts;
- pkt->pts = AV_NOPTS_VALUE;
- }
+ pkt->pts = AV_NOPTS_VALUE;
resample_changed = ist->resample_sample_fmt != decoded_frame->format ||
ist->resample_channels != avctx->channels ||