aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-07-17 16:02:33 +0100
committerReinhard Tartler <siretart@tauware.de>2011-09-30 15:37:05 +0200
commite257eebd17fbb7e880cfdde8a80c089434b6cf1f (patch)
treeffec1d17ba6883d7e13ad077496f9a365c04fce7
parent9bb7a128a34fb5e4abcd265e5dfcb61787ad2f0f (diff)
downloadffmpeg-e257eebd17fbb7e880cfdde8a80c089434b6cf1f.tar.gz
lavf: do not set codec_tag for rawvideo
If the demuxer did not set a codec_tag, there is none and inventing one makes no sense. This change stops the rawvideo "decoder" over-writing user-supplied pixfmt with one derived from the codec_tag. The pixfmt-codec_tag-pixfmt round-trip is lossy since several pixfmts map to the same codec_tag. This fixes fate-lavf-pixfmt with avfilter disabled. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit bb416bd68ca46b4a3f1901533064d56a6b8ac95e) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavformat/utils.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d9d154e3ab..e3c7d4aa84 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2405,9 +2405,6 @@ int av_find_stream_info(AVFormatContext *ic)
(st->codec_info_nb_frames-2)*(int64_t)st->time_base.den,
st->info->codec_info_duration*(int64_t)st->time_base.num, 60000);
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
- if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample)
- st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
-
// the check for tb_unreliable() is not completely correct, since this is not about handling
// a unreliable/inexact time base, but a time base that is finer than necessary, as e.g.
// ipmovie.c produces.