Merge commit '26ba78adacd8469fca97c8c833e2e6364b13b7c8' into release/2.4
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 18 Jan 2015 00:29:55 +0000 (01:29 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 18 Jan 2015 00:30:15 +0000 (01:30 +0100)
* commit '26ba78adacd8469fca97c8c833e2e6364b13b7c8':
  mov: fix assigment check

Conflicts:
libavformat/mov.c

See: af2e5061bbcabf5eae780929fa25784b6127759e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/mov.c

@@@ -3617,35 -3090,9 +3617,35 @@@ static int mov_read_header(AVFormatCont
      for (i = 0; i < s->nb_streams; i++) {
          AVStream *st = s->streams[i];
          MOVStreamContext *sc = st->priv_data;
 +        if (sc->timecode_track > 0) {
 +            AVDictionaryEntry *tcr;
 +            int tmcd_st_id = -1;
 +
 +            for (j = 0; j < s->nb_streams; j++)
 +                if (s->streams[j]->id == sc->timecode_track)
 +                    tmcd_st_id = j;
 +
 +            if (tmcd_st_id < 0 || tmcd_st_id == i)
 +                continue;
 +            tcr = av_dict_get(s->streams[tmcd_st_id]->metadata, "timecode", NULL, 0);
 +            if (tcr)
 +                av_dict_set(&st->metadata, "timecode", tcr->value, 0);
 +        }
 +    }
 +    export_orphan_timecode(s);
  
 +    for (i = 0; i < s->nb_streams; i++) {
 +        AVStream *st = s->streams[i];
 +        MOVStreamContext *sc = st->priv_data;
 +        fix_timescale(mov, sc);
 +        if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->codec_id == AV_CODEC_ID_AAC) {
 +            st->skip_samples = sc->start_pad;
 +        }
 +        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && sc->nb_frames_for_fps > 0 && sc->duration_for_fps > 0)
 +            av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
 +                      sc->time_scale*(int64_t)sc->nb_frames_for_fps, sc->duration_for_fps, INT_MAX);
          if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
-             if (st->codec->width <= 0 && st->codec->height <= 0) {
+             if (st->codec->width <= 0 || st->codec->height <= 0) {
                  st->codec->width  = sc->width;
                  st->codec->height = sc->height;
              }