Merge commit 'c872d310cd9c605e5f994ad8ac79dc72303c0d29'
* commit 'c872d310cd9c605e5f994ad8ac79dc72303c0d29': avconv: stop accessing AVStream.parser Conflicts: ffmpeg.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
9
ffmpeg.c
9
ffmpeg.c
@@ -468,6 +468,8 @@ static void ffmpeg_cleanup(int ret)
|
|||||||
output_streams[i]->bitstream_filters = NULL;
|
output_streams[i]->bitstream_filters = NULL;
|
||||||
avcodec_free_frame(&output_streams[i]->filtered_frame);
|
avcodec_free_frame(&output_streams[i]->filtered_frame);
|
||||||
|
|
||||||
|
av_parser_close(output_streams[i]->parser);
|
||||||
|
|
||||||
av_freep(&output_streams[i]->forced_keyframes);
|
av_freep(&output_streams[i]->forced_keyframes);
|
||||||
av_expr_free(output_streams[i]->forced_keyframes_pexpr);
|
av_expr_free(output_streams[i]->forced_keyframes_pexpr);
|
||||||
av_freep(&output_streams[i]->avfilter);
|
av_freep(&output_streams[i]->avfilter);
|
||||||
@@ -1467,7 +1469,10 @@ 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_MPEG2VIDEO
|
||||||
&& ost->st->codec->codec_id != AV_CODEC_ID_VC1
|
&& 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(ost->parser, 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);
|
opkt.buf = av_buffer_create(opkt.data, opkt.size, av_buffer_default_free, NULL, 0);
|
||||||
if (!opkt.buf)
|
if (!opkt.buf)
|
||||||
exit_program(1);
|
exit_program(1);
|
||||||
@@ -2256,6 +2261,8 @@ static int transcode_init(void)
|
|||||||
av_reduce(&codec->time_base.num, &codec->time_base.den,
|
av_reduce(&codec->time_base.num, &codec->time_base.den,
|
||||||
codec->time_base.num, codec->time_base.den, INT_MAX);
|
codec->time_base.num, codec->time_base.den, INT_MAX);
|
||||||
|
|
||||||
|
ost->parser = av_parser_init(codec->codec_id);
|
||||||
|
|
||||||
switch (codec->codec_type) {
|
switch (codec->codec_type) {
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
if (audio_volume != 256) {
|
if (audio_volume != 256) {
|
||||||
|
Reference in New Issue
Block a user