diff h263dec.c @ 1372:b52e62d17bbb libavcodec

last frame decoding fix
author michaelni
date Wed, 23 Jul 2003 09:58:02 +0000
parents 0fd38b711f06
children da0b3a50d209
line wrap: on
line diff
--- a/h263dec.c	Wed Jul 23 00:32:50 2003 +0000
+++ b/h263dec.c	Wed Jul 23 09:58:02 2003 +0000
@@ -401,9 +401,17 @@
     s->flags= avctx->flags;
 
     *data_size = 0;
-   
-   /* no supplementary picture */
+
+    /* no supplementary picture */
     if (buf_size == 0) {
+        /* special case for last picture */
+        if (s->low_delay==0 && s->next_picture_ptr) {
+            *pict= *(AVFrame*)s->next_picture_ptr;
+            s->next_picture_ptr= NULL;
+
+            *data_size = sizeof(AVFrame);
+        }
+
         return 0;
     }