summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-12-01 02:07:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-12-01 02:07:46 +0000
commit483aad717e898c265fde51e1a837e51bedff6faa (patch)
tree9739193f277068d0f24bf8e72fce8f4401047cdf /libavcodec/mpeg12.c
parentf40a7fd3162222e1cc8af3b43d4d47033558278b (diff)
slif aka "SoftLab MPEG-2 I-frames Codec" support.
Flipping one bit still is popular it seems as a means to create a new codec. fixes issue1469. Originally committed as revision 20679 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 6680db2328..b9896aeb0d 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1694,6 +1694,9 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
s->mb_x=0;
+ if(mb_y==0 && s->codec_tag == AV_RL32("SLIF")){
+ skip_bits1(&s->gb);
+ }else{
for(;;) {
int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2);
if (code < 0){
@@ -1710,6 +1713,8 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
break;
}
}
+ }
+
if(s->mb_x >= (unsigned)s->mb_width){
av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n");
return -1;