aboutsummaryrefslogtreecommitdiff
path: root/libavformat/smacker.c
diff options
context:
space:
mode:
authorKostya Shishkov2007-08-23 06:59:19 +0000
committerKostya Shishkov2007-08-23 06:59:19 +0000
commit2b71ddd96ec0e0b9e0f799b06ba61108cade1af3 (patch)
treeb74b173b265ead9e59c2a50c107ecd8996289a74 /libavformat/smacker.c
parent2e1ad4a28eaf9bdc5548954db20bd1406e04a459 (diff)
Take ring frame into account when demuxing.
This fixes issue 97. Originally committed as revision 10192 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r--libavformat/smacker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 2b2166cd53..655e7fb69f 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -28,6 +28,7 @@
#include "bswap.h"
#define SMACKER_PAL 0x01
+#define SMACKER_FLAG_RING_FRAME 0x01
enum SAudFlags {
SMK_AUD_PACKED = 0x80000000,
@@ -112,6 +113,8 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
smk->frames = get_le32(pb);
smk->pts_inc = (int32_t)get_le32(pb);
smk->flags = get_le32(pb);
+ if(smk->flags & SMACKER_FLAG_RING_FRAME)
+ smk->frames++;
for(i = 0; i < 7; i++)
smk->audio[i] = get_le32(pb);
smk->treesize = get_le32(pb);