[MPlayer-cvslog] r37830 - trunk/libmpcodecs/vd_ffmpeg.c

rtogni subversion at mplayerhq.hu
Thu Mar 3 21:48:46 CET 2016


Author: rtogni
Date: Thu Mar  3 21:48:45 2016
New Revision: 37830

Log:
Drop audio buffer wrapping code from vd_ffmpeg

In vd_ffmpeg the codec type is always video, so the code to wrap audio
buffers in avbuffer is useless and never used.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Thu Mar  3 21:44:29 2016	(r37829)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Thu Mar  3 21:48:45 2016	(r37830)
@@ -1199,7 +1199,7 @@ do {
     }                                                                   \
 } while (0)
 
-    if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
+    {
         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
 
         planes = av_pix_fmt_count_planes(frame->format);
@@ -1218,27 +1218,6 @@ do {
 
             WRAP_PLANE(frame->buf[i], frame->data[i], plane_size);
         }
-    } else {
-        int planar = av_sample_fmt_is_planar(frame->format);
-        planes = planar ? avctx->channels : 1;
-
-        if (planes > FF_ARRAY_ELEMS(frame->buf)) {
-            frame->nb_extended_buf = planes - FF_ARRAY_ELEMS(frame->buf);
-            frame->extended_buf = av_malloc_array(sizeof(*frame->extended_buf),
-                                            frame->nb_extended_buf);
-            if (!frame->extended_buf) {
-                ret = AVERROR(ENOMEM);
-                goto fail;
-            }
-        }
-
-        for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++)
-            WRAP_PLANE(frame->buf[i], frame->extended_data[i], frame->linesize[0]);
-
-        for (i = 0; i < frame->nb_extended_buf; i++)
-            WRAP_PLANE(frame->extended_buf[i],
-                       frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)],
-                       frame->linesize[0]);
     }
 
     av_buffer_unref(&dummy_buf);


More information about the MPlayer-cvslog mailing list