[vlc-commits] decoder: move decoder_NewPicture() into a function

Steve Lhomme git at videolan.org
Mon Feb 18 16:11:27 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 18 15:38:35 2019 +0100| [763b8bbfc1675598543c4dea4e8076a8202854bf] | committer: Steve Lhomme

decoder: move decoder_NewPicture() into a function

It is going to use the video context in push and most likely an internal pool.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=763b8bbfc1675598543c4dea4e8076a8202854bf
---

 include/vlc_codec.h         | 7 +------
 src/input/decoder_helpers.c | 6 ++++++
 src/libvlccore.sym          | 1 +
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 8130ea56d4..3896bae002 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -286,12 +286,7 @@ VLC_API int decoder_UpdateVideoFormat( decoder_t *dec );
  *
  * \return a picture buffer on success, NULL on error
  */
-VLC_USED
-static inline picture_t *decoder_NewPicture( decoder_t *dec )
-{
-    vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
-    return dec->cbs->video.buffer_new( dec );
-}
+VLC_API picture_t *decoder_NewPicture( decoder_t *dec );
 
 /**
  * Abort any calls of decoder_NewPicture
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index d03643346e..ff1ae04b81 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -81,3 +81,9 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
         return dec->cbs->video.format_update( dec );
     return -1;
 }
+
+picture_t *decoder_NewPicture( decoder_t *dec )
+{
+    vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
+    return dec->cbs->video.buffer_new( dec );
+}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 3f8ca498de..85cf3802a7 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -73,6 +73,7 @@ date_Change
 date_Decrement
 date_Increment
 date_Init
+decoder_NewPicture
 decoder_Init
 decoder_Clean
 decoder_Destroy



More information about the vlc-commits mailing list