diff mbox

[FFmpeg-devel,1/2] libschroedingerdec: don't produce empty frames

Message ID 5e79953b-5f6e-51ea-927a-84bbe87042df@googlemail.com
State Accepted
Commit a86ebbf7f641bc797002ddea7fb517759722cd1b
Headers show

Commit Message

Andreas Cadhalpun Nov. 13, 2016, 10:24 p.m. UTC
They are not valid and can cause problems/crashes for API users.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
---
 libavcodec/libschroedingerdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Nov. 15, 2016, 2:06 a.m. UTC | #1
On Sun, Nov 13, 2016 at 11:24:45PM +0100, Andreas Cadhalpun wrote:
> They are not valid and can cause problems/crashes for API users.
> 
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
> ---
>  libavcodec/libschroedingerdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

should be ok

[...]

thx
diff mbox

Patch

diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index c9930c7..1e392b3 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)