System.out.println(...)

'Deprecated'에 해당되는 글 1건

  1. ffmpeg 사라진 함수들 수정하는 방법

ffmpeg 사라진 함수들 수정하는 방법

ffmpeg

시간이 좀 지난 프로젝트의 ffmpeg 버전을 최신버전으로 하여 함께 컴파일 했더니 몇가지 에러와 만나게 되었습니다.

 

AVStream *  av_new_stream (AVFormatContext *s) ->

AVStream *  avformat_new_stream (AVFormatContext *s, const AVCodec *c)

 

int  av_find_stream_info (AVFormatContext *ic) ->

int  avformat_find_stream_info (AVFormatContext *ic, AVDictionary **options)

 

deprecated 된 함수들은 아래를 참고하여 수정해 주시면 됩니다.


 


-    if ((err = av_find_stream_info(fmt_ctx)) < 0) {
+    if ((err = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {


     for (i = 1; i < pmp->num_streams; i++) {
-        AVStream *ast = av_new_stream(s, i);
+        AVStream *ast = avformat_new_stream(s, NULL);
         if (!ast)
             return AVERROR(ENOMEM);
+        ast->id = i;
         ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         ast->codec->codec_id = audio_codec_id;
         ast->codec->channels = channels;

'ffmpeg' 카테고리의 다른 글

android ndk ffmpeg 컴파일하기 #1 20161028 수정판  (1) 2016.10.31
android ndk ffmpeg 컴파일하기 #1  (1) 2015.09.23