Update the dvdsub parser to be able to parse HD-DVD subtitle packets.
authorIan Caulfield <ian.caulfield@gmx.at>
Tue, 24 Jul 2007 14:17:13 +0000 (14:17 +0000)
committerPanagiotis Issaris <takis.issaris@uhasselt.be>
Tue, 24 Jul 2007 14:17:13 +0000 (14:17 +0000)
Patch by: Ian Caulfield, ian caulfield & gmx at

Originally committed as revision 9790 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/dvdsub_parser.c

index 5f1c1b6..0893dac 100644 (file)
@@ -43,6 +43,8 @@ static int dvdsub_parse(AVCodecParserContext *s,
         if (buf_size < 2)
             return 0;
         pc->packet_len = AV_RB16(buf);
+        if (pc->packet_len == 0) /* HD-DVD subpicture packet */
+            pc->packet_len = AV_RB32(buf+2);
         av_freep(&pc->packet);
         pc->packet = av_malloc(pc->packet_len);
     }