[FFmpeg-cvslog] examples/filtering: fix deprecated function calls warnings.

Clément Bœsch git at videolan.org
Sun Feb 19 02:21:16 CET 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Feb 17 11:18:27 2012 +0100| [b117c392376c32e7c67022c0bf7c2da61dee5bb1] | committer: Clément Bœsch

examples/filtering: fix deprecated function calls warnings.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b117c392376c32e7c67022c0bf7c2da61dee5bb1
---

 doc/examples/filtering.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/examples/filtering.c b/doc/examples/filtering.c
index d837fb6..fa8cb89 100644
--- a/doc/examples/filtering.c
+++ b/doc/examples/filtering.c
@@ -55,7 +55,7 @@ static int open_input_file(const char *filename)
         return ret;
     }
 
-    if ((ret = av_find_stream_info(fmt_ctx)) < 0) {
+    if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
         av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
         return ret;
     }
@@ -70,7 +70,7 @@ static int open_input_file(const char *filename)
     dec_ctx = fmt_ctx->streams[video_stream_index]->codec;
 
     /* init the video decoder */
-    if ((ret = avcodec_open(dec_ctx, dec)) < 0) {
+    if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {
         av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
         return ret;
     }
@@ -205,7 +205,7 @@ int main(int argc, char **argv)
 
                 /* pull filtered pictures from the filtergraph */
                 while (avfilter_poll_frame(buffersink_ctx->inputs[0])) {
-                    av_vsink_buffer_get_video_buffer_ref(buffersink_ctx, &picref, 0);
+                    av_buffersink_get_buffer_ref(buffersink_ctx, &picref, 0);
                     if (picref) {
                         display_picref(picref, buffersink_ctx->inputs[0]->time_base);
                         avfilter_unref_buffer(picref);
@@ -218,7 +218,7 @@ end:
     avfilter_graph_free(&filter_graph);
     if (dec_ctx)
         avcodec_close(dec_ctx);
-    av_close_input_file(fmt_ctx);
+    avformat_close_input(&fmt_ctx);
 
     if (ret < 0 && ret != AVERROR_EOF) {
         char buf[1024];



More information about the ffmpeg-cvslog mailing list