changeset 3109:20e070d8706f libavformat

Ignore flags after pts/dts if there are no bytes left. Fixes decoding of vdr-radio.vdr. (issue198)
author michael
date Tue, 04 Mar 2008 01:31:15 +0000
parents feeee985c74c
children 3dade22abed6
files mpeg.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg.c	Mon Mar 03 23:00:48 2008 +0000
+++ b/mpeg.c	Tue Mar 04 01:31:15 2008 +0000
@@ -334,6 +334,10 @@
                 header_len -= 5;
             }
         }
+        if (flags & 0x3f && header_len == 0){
+            flags &= 0xC0;
+            av_log(s, AV_LOG_WARNING, "Further flags set but no bytes left\n");
+        }
         if (flags & 0x01) { /* PES extension */
             pes_ext = get_byte(s->pb);
             header_len--;