vda: convert 3 byte NAL sizes to 4 byte.
authorSebastien Zwickert <dilaroga@free.fr>
Sun, 8 Jan 2012 19:22:12 +0000 (20:22 +0100)
committerSebastien Zwickert <dilaroga@free.fr>
Sun, 8 Jan 2012 19:22:12 +0000 (20:22 +0100)
libavcodec/vda.c

index aaf5ba0..20207ea 100644 (file)
@@ -179,6 +179,11 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
 
     vda_lock_operation(&vda_ctx->queue_mutex, AV_LOCK_CREATE);
 
+    if (extradata[4]==0xFE) {
+        // convert 3 byte NAL sizes to 4 byte
+        extradata[4] = 0xFF;
+    }
+
     config_info = CFDictionaryCreateMutable(kCFAllocatorDefault,
                                             4,
                                             &kCFTypeDictionaryKeyCallBacks,