Merge commit '1ae8198bca749a0cff205196cc83d35b9962849b'

* commit '1ae8198bca749a0cff205196cc83d35b9962849b':
  avconv: always reset packet pts after decoding an audio frame

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-22 13:45:34 +02:00
commit 3bf189bb00

View File

@ -1791,16 +1791,15 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
decoded_frame_tb = avctx->time_base;
} else if (decoded_frame->pkt_pts != AV_NOPTS_VALUE) {
decoded_frame->pts = decoded_frame->pkt_pts;
pkt->pts = AV_NOPTS_VALUE;
decoded_frame_tb = ist->st->time_base;
} else if (pkt->pts != AV_NOPTS_VALUE) {
decoded_frame->pts = pkt->pts;
pkt->pts = AV_NOPTS_VALUE;
decoded_frame_tb = ist->st->time_base;
}else {
decoded_frame->pts = ist->dts;
decoded_frame_tb = AV_TIME_BASE_Q;
}
pkt->pts = AV_NOPTS_VALUE;
if (decoded_frame->pts != AV_NOPTS_VALUE)
decoded_frame->pts = av_rescale_delta(decoded_frame_tb, decoded_frame->pts,
(AVRational){1, ist->st->codec->sample_rate}, decoded_frame->nb_samples, &ist->filter_in_rescale_delta_last,