aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-14 21:06:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-15 01:11:02 +0200
commit27375c25d9c810b45501f5fd5425f637d17da0bf (patch)
tree087f514ae2d56f4453091c61dc2e0e6a3f8dc731
parentab6dd7fea97f6785d16caa9acdd26bc435d1e713 (diff)
downloadffmpeg-27375c25d9c810b45501f5fd5425f637d17da0bf.tar.gz
ffmpeg: Use av_stream_get_parser() to avoid ABI issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 8bbadc9b6ec71abbd9dab854c47027b949997af0) Conflicts: ffmpeg.c (cherry picked from commit 8fae6207e30059611cdc788ad440b6831637f86f) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 1dc9ef9b79..9aa094ead1 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1483,7 +1483,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
&& ost->st->codec->codec_id != AV_CODEC_ID_MPEG2VIDEO
&& ost->st->codec->codec_id != AV_CODEC_ID_VC1
) {
- if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY)) {
+ if (av_parser_change(av_stream_get_parser(ist->st), ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY)) {
opkt.buf = av_buffer_create(opkt.data, opkt.size, av_buffer_default_free, NULL, 0);
if (!opkt.buf)
exit_program(1);
@@ -1883,7 +1883,7 @@ static int output_packet(InputStream *ist, const AVPacket *pkt)
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) {
- int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
+ int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict+1 : ist->st->codec->ticks_per_frame;
duration = ((int64_t)AV_TIME_BASE *
ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den;
@@ -1940,7 +1940,7 @@ static int output_packet(InputStream *ist, const AVPacket *pkt)
} else if (pkt->duration) {
ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
} else if(ist->st->codec->time_base.num != 0) {
- int ticks= ist->st->parser ? ist->st->parser->repeat_pict + 1 : ist->st->codec->ticks_per_frame;
+ int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict + 1 : ist->st->codec->ticks_per_frame;
ist->next_dts += ((int64_t)AV_TIME_BASE *
ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den;