[FFmpeg-cvslog] libschroedingerdec: don't produce empty frames

Andreas Cadhalpun git at videolan.org
Sun Nov 27 01:41:12 EET 2016


ffmpeg | branch: release/3.0 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sun Nov 13 22:59:47 2016 +0100| [57665e04e22a201d3c56072532c15ce6ba71353a] | committer: Andreas Cadhalpun

libschroedingerdec: don't produce empty frames

They are not valid and can cause problems/crashes for API users.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
(cherry picked from commit a86ebbf7f641bc797002ddea7fb517759722cd1b)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

 libavcodec/libschroedingerdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index 152cbe7..fe20e9c 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
@@ -307,7 +307,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avctx,
     /* Grab next frame to be returned from the top of the queue. */
     framewithpts = ff_schro_queue_pop(&p_schro_params->dec_frame_queue);
 
-    if (framewithpts && framewithpts->frame) {
+    if (framewithpts && framewithpts->frame && framewithpts->frame->components[0].stride) {
         int ret;
 
         if ((ret = ff_get_buffer(avctx, avframe, 0)) < 0)



More information about the ffmpeg-cvslog mailing list