changeset 831:14f4598ec793 libavcodec

support forcing low_delay during decoding
author michaelni
date Sat, 02 Nov 2002 18:47:51 +0000
parents 0a1fbae9f6e1
children ff66fdb1d092
files avcodec.h h263dec.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Sat Nov 02 14:20:05 2002 +0000
+++ b/avcodec.h	Sat Nov 02 18:47:51 2002 +0000
@@ -132,6 +132,7 @@
                                                 allows the last part of a frame to be decoded earlier */
 #define CODEC_FLAG_NORMALIZE_AQP  0x00020000 /* normalize adaptive quantization */
 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 /* use interlaced dct */
+#define CODEC_FLAG_LOW_DELAY      0x00080000 /* force low delay / will fail on b frames */
 
 /* codec capabilities */
 
--- a/h263dec.c	Sat Nov 02 14:20:05 2002 +0000
+++ b/h263dec.c	Sat Nov 02 18:47:51 2002 +0000
@@ -351,6 +351,9 @@
         }
         ret = ff_mpeg4_decode_picture_header(s, &s->gb);
 
+        if(s->flags& CODEC_FLAG_LOW_DELAY)
+            s->low_delay=1;
+
         s->has_b_frames= !s->low_delay;
     } else if (s->h263_intel) {
         ret = intel_h263_decode_picture_header(s);