diff options
author | James Almer | 2016-09-27 10:10:44 -0300 |
---|---|---|
committer | James Almer | 2016-09-27 10:42:51 -0300 |
commit | 4a05d2eda7215fcadbebec8f4656bbb71574567e (patch) | |
tree | 03dd827febe894f4d5e0a5e12f6cf4a523d8453d /ffmpeg_opt.c | |
parent | f0b6f7253f3e69a475722b8f0b0e4289201245bf (diff) |
ffmpeg: stop using AVStream.codec on stream copy
This commit is based on commit 35c8580 from Anton Khirnov <anton@khirnov.net>
which was skipped in b8945c4.
The avcodec_copy_context() call in the encode path is left in place for now
as AVStream.codec is apparently still required even after porting ffmpeg to
the new bsf API.
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 73da5463d1..d202f4396c 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -2300,6 +2300,7 @@ loop_end: avio_read(pb, attachment, len); ost = new_attachment_stream(o, oc, -1); + ost->stream_copy = 0; ost->attachment_filename = o->attachments[i]; ost->st->codecpar->extradata = attachment; ost->st->codecpar->extradata_size = len; @@ -2309,6 +2310,7 @@ loop_end: avio_closep(&pb); } +#if FF_API_LAVF_AVCTX for (i = nb_output_streams - oc->nb_streams; i < nb_output_streams; i++) { //for all streams of this output file AVDictionaryEntry *e; ost = output_streams[i]; @@ -2319,6 +2321,7 @@ loop_end: if (av_opt_set(ost->st->codec, "flags", e->value, 0) < 0) exit_program(1); } +#endif if (!oc->nb_streams && !(oc->oformat->flags & AVFMT_NOSTREAMS)) { av_dump_format(oc, nb_output_files - 1, oc->filename, 1); |