Revision f0bc8449 libavcodec/imgconvert.c

View differences:

libavcodec/imgconvert.c
902 902
    enum PixelFormat dst_pix_fmt;
903 903

  
904 904
    /* find exact color match with smallest size */
905
    dst_pix_fmt = -1;
905
    dst_pix_fmt = PIX_FMT_NONE;
906 906
    min_dist = 0x7fffffff;
907 907
    for(i = 0;i < PIX_FMT_NB; i++) {
908 908
        if (pix_fmt_mask & (1ULL << i)) {
......
945 945
        if (loss_mask == 0)
946 946
            break;
947 947
    }
948
    return -1;
948
    return PIX_FMT_NONE;
949 949
 found:
950 950
    if (loss_ptr)
951 951
        *loss_ptr = avcodec_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha);

Also available in: Unified diff