summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-20 11:27:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-20 11:40:05 +0200
commit953df5d9628d04a760eebed3619de3e7b93fbbb7 (patch)
treef641f9baf35b8467489c0a292ecddfdb14ab92a0 /ffmpeg.c
parentef7ac8e8ecdd273759a61d68ebdf8f0036f882a0 (diff)
ffmpeg: drop pkt_pts
Reduces diff to qatar by 9 lines Should not change anything Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 9e24515d0f..ebe292507e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2640,7 +2640,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
return ret;
}
-static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts)
+static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output)
{
AVFrame *decoded_frame;
void *buffer_to_free = NULL;
@@ -2654,9 +2654,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
else
avcodec_get_frame_defaults(ist->decoded_frame);
decoded_frame = ist->decoded_frame;
- pkt->pts = *pkt_pts;
pkt->dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base);
- *pkt_pts = AV_NOPTS_VALUE;
update_benchmark(NULL);
ret = avcodec_decode_video2(ist->st->codec,
@@ -2778,7 +2776,6 @@ static int output_packet(InputStream *ist, const AVPacket *pkt)
{
int ret = 0, i;
int got_output;
- int64_t pkt_pts = AV_NOPTS_VALUE;
AVPacket avpkt;
if (!ist->saw_first_ts) {
@@ -2811,8 +2808,6 @@ static int output_packet(InputStream *ist, const AVPacket *pkt)
if (ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO || !ist->decoding_needed)
ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
}
- if(pkt->pts != AV_NOPTS_VALUE)
- pkt_pts = pkt->pts;
// while we have more to decode or while the decoder did output something on EOF
while (ist->decoding_needed && (avpkt.size > 0 || (!pkt && got_output))) {
@@ -2833,7 +2828,7 @@ static int output_packet(InputStream *ist, const AVPacket *pkt)
ret = transcode_audio (ist, &avpkt, &got_output);
break;
case AVMEDIA_TYPE_VIDEO:
- ret = transcode_video (ist, &avpkt, &got_output, &pkt_pts);
+ ret = transcode_video (ist, &avpkt, &got_output);
if (avpkt.duration) {
duration = av_rescale_q(avpkt.duration, ist->st->time_base, AV_TIME_BASE_Q);
} else if(ist->st->codec->time_base.num != 0 && ist->st->codec->time_base.den != 0) {