[FFmpeg-cvslog] examples: do not use AVFrame accessor

Muhammad Faiz git at videolan.org
Sun Apr 23 11:13:47 EEST 2017


ffmpeg | branch: master | Muhammad Faiz <mfcc64 at gmail.com> | Sat Apr 22 15:58:37 2017 +0700| [327a1c0dee05efff74b1fe18144a6543c44975fa] | committer: Muhammad Faiz

examples: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg at googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>

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

 doc/examples/filtering_audio.c | 2 +-
 doc/examples/filtering_video.c | 2 +-
 doc/examples/transcoding.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 679218c82f..9fc4f1cb7e 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -201,7 +201,7 @@ end:
 
 static void print_frame(const AVFrame *frame)
 {
-    const int n = frame->nb_samples * av_get_channel_layout_nb_channels(av_frame_get_channel_layout(frame));
+    const int n = frame->nb_samples * av_get_channel_layout_nb_channels(frame->channel_layout);
     const uint16_t *p     = (uint16_t*)frame->data[0];
     const uint16_t *p_end = p + n;
 
diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c
index 4d973024f1..4e09c6fba4 100644
--- a/doc/examples/filtering_video.c
+++ b/doc/examples/filtering_video.c
@@ -253,7 +253,7 @@ int main(int argc, char **argv)
                 }
 
                 if (ret >= 0) {
-                    frame->pts = av_frame_get_best_effort_timestamp(frame);
+                    frame->pts = frame->best_effort_timestamp;
 
                     /* push the decoded frame into the filtergraph */
                     if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0) {
diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c
index 476ec69afe..fb15a2148d 100644
--- a/doc/examples/transcoding.c
+++ b/doc/examples/transcoding.c
@@ -558,7 +558,7 @@ int main(int argc, char **argv)
             }
 
             if (got_frame) {
-                frame->pts = av_frame_get_best_effort_timestamp(frame);
+                frame->pts = frame->best_effort_timestamp;
                 ret = filter_encode_write_frame(frame, stream_index);
                 av_frame_free(&frame);
                 if (ret < 0)



More information about the ffmpeg-cvslog mailing list