Commit 8b452bee authored by michael's avatar michael

be sligghtly more carefull with copying the codec_tag in the streamcopy case

fixes streacopy of Xmen-avc-500.vp6 into flv
closes issue57


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9909 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e0dbfcd1
...@@ -1503,6 +1503,7 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1503,6 +1503,7 @@ static int av_encode(AVFormatContext **output_files,
/* for each output stream, we compute the right encoding parameters */ /* for each output stream, we compute the right encoding parameters */
for(i=0;i<nb_ostreams;i++) { for(i=0;i<nb_ostreams;i++) {
ost = ost_table[i]; ost = ost_table[i];
os = output_files[ost->file_index];
ist = ist_table[ost->source_index]; ist = ist_table[ost->source_index];
codec = ost->st->codec; codec = ost->st->codec;
...@@ -1516,7 +1517,14 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1516,7 +1517,14 @@ static int av_encode(AVFormatContext **output_files,
/* if stream_copy is selected, no need to decode or encode */ /* if stream_copy is selected, no need to decode or encode */
codec->codec_id = icodec->codec_id; codec->codec_id = icodec->codec_id;
codec->codec_type = icodec->codec_type; codec->codec_type = icodec->codec_type;
if(!codec->codec_tag) codec->codec_tag = icodec->codec_tag;
if(!codec->codec_tag){
if( !os->oformat->codec_tag
|| av_codec_get_id (os->oformat->codec_tag, icodec->codec_tag) > 0
|| av_codec_get_tag(os->oformat->codec_tag, icodec->codec_id) <= 0)
codec->codec_tag = icodec->codec_tag;
}
codec->bit_rate = icodec->bit_rate; codec->bit_rate = icodec->bit_rate;
codec->extradata= icodec->extradata; codec->extradata= icodec->extradata;
codec->extradata_size= icodec->extradata_size; codec->extradata_size= icodec->extradata_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment