Revision 0b9dffc6 libavformat/utils.c

View differences:

libavformat/utils.c
25 25
#include "avio_internal.h"
26 26
#include "internal.h"
27 27
#include "libavcodec/internal.h"
28
#include "libavcodec/raw.h"
28 29
#include "libavutil/opt.h"
29 30
#include "metadata.h"
30 31
#include "id3v2.h"
......
2428 2429
                     (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den,
2429 2430
                      st->info->codec_info_duration*(int64_t)st->time_base.num, 60000);
2430 2431
        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
2431
            if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample)
2432
                st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
2432
            if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample){
2433
                uint32_t tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
2434
                if(ff_find_pix_fmt(ff_raw_pix_fmt_tags, tag) == st->codec->pix_fmt)
2435
                    st->codec->codec_tag= tag;
2436
            }
2433 2437

  
2434 2438
            // the check for tb_unreliable() is not completely correct, since this is not about handling
2435 2439
            // a unreliable/inexact time base, but a time base that is finer than necessary, as e.g.

Also available in: Unified diff