Revision c04c3282 libavformat/raw.c

View differences:

libavformat/raw.c
48 48
    st = av_new_stream(s, 0);
49 49
    if (!st)
50 50
        return AVERROR_NOMEM;
51
    if (ap) {
51

  
52 52
        id = s->iformat->value;
53 53
        if (id == CODEC_ID_RAWVIDEO) {
54 54
            st->codec->codec_type = CODEC_TYPE_VIDEO;
......
74 74
        default:
75 75
            return -1;
76 76
        }
77
    } else {
78
        return -1;
79
    }
80 77
    return 0;
81 78
}
82 79

  
......
289 286

  
290 287
    /* for mjpeg, specify frame rate */
291 288
    /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/
292
    if (ap && ap->time_base.num) {
289
    if (ap->time_base.num) {
293 290
        av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
294 291
    } else if ( st->codec->codec_id == CODEC_ID_MJPEG ||
295 292
                st->codec->codec_id == CODEC_ID_MPEG4 ||

Also available in: Unified diff