avformat: do not use AVFrame accessor
authorMuhammad Faiz <mfcc64@gmail.com>
Sat, 22 Apr 2017 08:55:45 +0000 (15:55 +0700)
committerMuhammad Faiz <mfcc64@gmail.com>
Sun, 23 Apr 2017 07:30:53 +0000 (14:30 +0700)
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
libavformat/mux.c
libavformat/uncodedframecrcenc.c

index 3a5e876..4e21083 100644 (file)
@@ -1422,7 +1422,7 @@ static int av_write_uncoded_frame_internal(AVFormatContext *s, int stream_index,
         pkt.size         = UNCODED_FRAME_PACKET_SIZE;
         pkt.pts          =
         pkt.dts          = frame->pts;
-        pkt.duration     = av_frame_get_pkt_duration(frame);
+        pkt.duration     = frame->pkt_duration;
         pkt.stream_index = stream_index;
         pkt.flags |= AV_PKT_FLAG_UNCODED_FRAME;
     }
index ecc42d2..2f1a14c 100644 (file)
@@ -79,7 +79,7 @@ static void audio_frame_cksum(AVBPrint *bp, AVFrame *frame)
     int nb_planes, nb_samples, p;
     const char *name;
 
-    nb_planes  = av_frame_get_channels(frame);
+    nb_planes  = frame->channels;
     nb_samples = frame->nb_samples;
     if (!av_sample_fmt_is_planar(frame->format)) {
         nb_samples *= nb_planes;