Revision 7ade06cc

View differences:

libavcodec/utils.c
551 551
               avctx->codec->max_lowres);
552 552
        goto free_and_end;
553 553
    }
554
    if (avctx->codec->sample_fmts && avctx->codec->encode) {
555
        int i;
556
        for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++)
557
            if (avctx->sample_fmt == avctx->codec->sample_fmts[i])
558
                break;
559
        if (avctx->codec->sample_fmts[i] == AV_SAMPLE_FMT_NONE) {
560
            av_log(avctx, AV_LOG_ERROR, "Specified sample_fmt is not supported.\n");
561
            goto free_and_end;
562
        }
563
    }
554 564

  
555 565
    avctx->pts_correction_num_faulty_pts =
556 566
    avctx->pts_correction_num_faulty_dts = 0;

Also available in: Unified diff