changeset 1657:aaaa1767acc2 libavcodec

set has_b_frames correctly, fixes rv20 dr1 with mplayer
author michael
date Thu, 04 Dec 2003 19:15:37 +0000
parents 34b0e799aeb6
children d4637a0eaab1
files rv10.c
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rv10.c	Thu Dec 04 18:46:49 2003 +0000
+++ b/rv10.c	Thu Dec 04 19:15:37 2003 +0000
@@ -376,7 +376,7 @@
         }
     }
         
-    if(s->avctx->sub_id == 0x20200002 || s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){
+    if(s->avctx->has_b_frames){
         if (get_bits(&s->gb, 1)){
             av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n");
             return -1;
@@ -460,9 +460,16 @@
         s->low_delay=1;
         break;
     case 0x20001000:
-    case 0x20100001: //ok
+    case 0x20100001:
+    case 0x20101001:
+        s->low_delay=1;
+        break;
     case 0x20200002:
-    case 0x20101001: //ok
+    case 0x30202002:
+    case 0x30203002:
+        s->low_delay=0;
+        s->avctx->has_b_frames=1;
+        break;
     default:
         av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id);
     }
@@ -508,7 +515,7 @@
 
     init_get_bits(&s->gb, buf, buf_size*8);
 #if 0
-    for(i=0; i<buf_size*8 && i<100; i++)
+    for(i=0; i<buf_size*8 && i<200; i++)
         printf("%d", get_bits1(&s->gb));
     printf("\n");
     return 0;