2016-07-14 7 views
1

내 raspberry-pi에서 ffmpeg를 컴파일하려고했지만 sudo make를 실행하는 동안 (코덱은 사용되지 않음) 많은 경고를 표시합니다.ffmpeg compilation Error

[email protected]:/usr/src/ffmpeg $ sudo make && sudo make install 

....... lots of successful execution here ...... 


CC libavfilter/avf_showfreqs.o 
libavfilter/lavfutils.c: In function ‘ff_load_image’: 
libavfilter/lavfutils.c:53:5: warning: ‘codec’ is deprecated (declared at ./libavformat/avformat.h:880) [-Wdeprecated-declarations] 
codec_ctx = format_ctx->streams[0]->codec; 
^ 
libavfilter/lavfutils.c:79:5: warning: ‘avcodec_decode_video2’ is deprecated (declared at ./libavcodec/avcodec.h:4763) [-Wdeprecated-declarations] 
ret = avcodec_decode_video2(codec_ctx, frame, &frame_decoded, &pkt); 
^ 
CC libavfilter/lswsutils.o 
CC libavfilter/opencl_allkernels.o 
CC libavfilter/pthread.o 
CC libavfilter/setpts.o 
CC libavfilter/settb.o 
CC libavfilter/split.o 
CC libavfilter/src_movie.o 
libavfilter/src_movie.c: In function ‘movie_push_frame’: 
libavfilter/src_movie.c:524:9: warning: ‘avcodec_decode_video2’ is deprecated (declared at ./libavcodec/avcodec.h:4763) [-Wdeprecated-declarations] 
    ret = avcodec_decode_video2(st->codec_ctx, frame, &got_frame, pkt); 
    ^
libavfilter/src_movie.c:527:9: warning: ‘avcodec_decode_audio4’ is deprecated (declared at ./libavcodec/avcodec.h:4714) [-Wdeprecated-declarations] 
    ret = avcodec_decode_audio4(st->codec_ctx, frame, &got_frame, pkt); 
    ^
CC libavfilter/transform.o 
CC libavfilter/trim.o 
CC libavfilter/vaf_spectrumsynth.o 
libavfilter/vaf_spectrumsynth.c: In function ‘try_push_frame’: 
libavfilter/vaf_spectrumsynth.c:370:19: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 
int ch, n, i, ret;    ^
CC libavfilter/vf_alphamerge.o 
CC libavfilter/vf_aspect.o 
CC libavfilter/vf_atadenoise.o 
CC libavfilter/vf_colorlevels.o 
CC libavfilter/vf_colorspace.o 
libavfilter/vf_colorspace.c: In function ‘fill_rgb2xyz_table’: 
libavfilter/vf_colorspace.c:360:22: warning: passing argument 1 of ‘invert_matrix3x3’ from incompatible pointer type 
invert_matrix3x3(rgb2xyz, i); 
       ^
libavfilter/vf_colorspace.c:277:13: note: expected ‘const double (*)[3]’ but argument is of type ‘double (*)[3]’ 
static void invert_matrix3x3(const double in[3][3], double out[3][3]) 
     ^
libavfilter/vf_colorspace.c: In function ‘fill_whitepoint_conv_table’: 
libavfilter/vf_colorspace.c:424:21: warning: passing argument 3 of ‘mul3x3’ from incompatible pointer type 
mul3x3(tmp, ma, fac); 
libavfilter/vf_colorspace.c:376:13: note: expected ‘const double (*)[3]’ but argument is of type ‘double (*)[3]’ 
static void mul3x3(double dst[3][3], const double src1[3][3], const double src2[3][3]) 
     ^
libavfilter/vf_colorspace.c:425:17: warning: passing argument 2 of ‘mul3x3’ from incompatible pointer type 
mul3x3(out, tmp, mai); 
      ^
libavfilter/vf_colorspace.c:376:13: note: expected ‘const double (*)[3]’ but argument is of type ‘double (*)[3]’ 
static void mul3x3(double dst[3][3], const double src1[3][3], const double src2[3][3]) 
     ^
libavfilter/vf_colorspace.c:425:22: warning: passing argument 3 of ‘mul3x3’ from incompatible pointer type 
mul3x3(out, tmp, mai); 
       ^
libavfilter/vf_colorspace.c:376:13: note: expected ‘const double (*)[3]’ but argument is of type ‘double (*)[3]’ 
static void mul3x3(double dst[3][3], const double src1[3][3], const double src2[3][3]) 
     ^
libavfilter/vf_colorspace.c: In function ‘convert’: 
libavfilter/vf_colorspace.c:480:20: warning: passing argument 7 of ‘s->yuv2yuv’ from incompatible pointer type 
       s->yuv2yuv_coeffs, s->yuv_offset); 
       ^
libavfilter/vf_colorspace.c:480:20: note: expected ‘const int16_t (*)[3][8]’ but argument is of type ‘int16_t (*)[3][8]’ 
libavfilter/vf_colorspace.c:480:39: warning: passing argument 8 of ‘s->yuv2yuv’ from incompatible pointer type 
       s->yuv2yuv_coeffs, s->yuv_offset); 
           ^
libavfilter/vf_colorspace.c:480:39: note: expected ‘const int16_t (*)[8]’ but argument is of type ‘int16_t (*)[8]’ 
libavfilter/vf_colorspace.c:502:20: warning: passing argument 7 of ‘s->yuv2rgb’ from incompatible pointer type 
       s->yuv2rgb_coeffs, s->yuv_offset[0]); 
       ^
libavfilter/vf_colorspace.c:502:20: note: expected ‘const int16_t (*)[3][8]’ but argument is of type ‘int16_t (*)[3][8]’ 
libavfilter/vf_colorspace.c:506:62: warning: passing argument 5 of ‘s->dsp.multiply3x3’ from incompatible pointer type 
      s->dsp.multiply3x3(rgb, s->rgb_stride, w, h, s->lrgb2lrgb_coeffs); 
                 ^
libavfilter/vf_colorspace.c:506:62: note: expected ‘const int16_t (*)[3][8]’ but argument is of type ‘int16_t (*)[3][8]’ 
libavfilter/vf_colorspace.c:511:28: warning: passing argument 7 of ‘s->rgb2yuv_fsb’ from incompatible pointer type 
         s->rgb2yuv_coeffs, s->yuv_offset[1], s->dither_scratch); 
         ^
libavfilter/vf_colorspace.c:511:28: note: expected ‘const int16_t (*)[3][8]’ but argument is of type ‘int16_t (*)[3][8]’ 
libavfilter/vf_colorspace.c:514:24: warning: passing argument 7 of ‘s->rgb2yuv’ from incompatible pointer type 
        s->rgb2yuv_coeffs, s->yuv_offset[1]); 
        ^
libavfilter/vf_colorspace.c:514:24: note: expected ‘const int16_t (*)[3][8]’ but argument is of type ‘int16_t (*)[3][8]’ 
libavfilter/vf_colorspace.c: In function ‘create_filtergraph’: 
libavfilter/vf_colorspace.c:614:30: warning: passing argument 1 of ‘invert_matrix3x3’ from incompatible pointer type 

       ^

과 아직도 계속 ....

어떻게 그것을 해결하기 위해? 이 경고의 문제점은 무엇입니까?

+0

사용중인 버전을 제공 할 수 있습니까? – arshpreet

+0

ffmpeg를 사용하고 있습니다. 3.1.1 – SivamNatesan

+0

다음을 시도하십시오 : http://johnvansickle.com/ffmpeg/release-source/ :) – arshpreet

답변

1

우선 은 루트으로 컴파일되지 않습니다.

일반 사용자로 make을 실행해야합니다 (sudo 제외).

루트가 소유 한 위치에 설치하는 경우에만 sudo make install을 실행하십시오 (예 : /usr 또는 /usr/local).


귀하의 질문에 대한 경고는 ffmpeg 코드에서 나온 것일뿐, 컴파일 한 것의 결과가 아닙니다.

ffmpeg 개발자보다 새로운 gcc를 사용하고있을 가능성이 있으며 새로운 버전에서는 이전에 확인 된 것으로 간주되는 물건에 대한 경고가 표시 될 수 있습니다. 또는 일부 경고를 켜는 gcc 옵션을 사용했을 수도 있고 ffmpeg 개발자가 사용하지 않도록 설정할 수도 있습니다. 또는 ffmpeg가 컴파일 할 때 경고를 보았을 수도 있고 무시할 수도 있습니다.

하지만 경고는 컴파일러에서 알려주는 것입니다.이 코드는 비위 맞지만 확인하고 싶지만 괜찮습니다. 따라서 실제 문제를 확인하지 않는 한 경고를 무시하거나 경고가 사라지는 방식으로 코드를 변경하는 패치 업스트림을 보낼 수 있습니다. 물론 코드는 올바른 것으로 유지됩니다.

예를 들어 warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]의 인스턴스가 표시됩니다. 음, 당신은 그 변수의 정의를 제거하는 패치를 업스트림으로 보낼 수 있으며, 그와 마찬가지로 하나의 경고가 사라질 것입니다. :)

제공 한 출력에 오류가 없으므로 컴파일이 성공했다고 가정하고 이제 ffmpeg의 새로운 빌드를 사용하고 있습니다.

여기에 붙여 넣지 않은 실제 오류가 있습니까?

+0

그래, 컴파일이 성공하고 오류는 없지만 모두 경고 일뿐입니다. 그 경고에 대해 걱정할 필요가 있을까요? – SivamNatesan

+0

소스 코드를 읽고 수정할 수있는 경우가 아니면 걱정할 필요가 없습니다. :) –

+0

나는 이것에 대해 많이 걱정했다. 고맙습니다. :) – SivamNatesan