[FFmpeg-cvslog] r15040 - trunk/libavformat/flvdec.c
bcoudurier
subversion
Sat Aug 30 00:03:18 CEST 2008
Author: bcoudurier
Date: Sat Aug 30 00:03:18 2008
New Revision: 15040
Log:
simplify size handling code
Modified:
trunk/libavformat/flvdec.c
Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c (original)
+++ trunk/libavformat/flvdec.c Sat Aug 30 00:03:18 2008
@@ -322,11 +322,13 @@ static int flv_read_packet(AVFormatConte
if (type == FLV_TAG_TYPE_AUDIO) {
is_audio=1;
flags = get_byte(s->pb);
+ size--;
} else if (type == FLV_TAG_TYPE_VIDEO) {
is_audio=0;
flags = get_byte(s->pb);
+ size--;
if ((flags & 0xf0) == 0x50) { /* video info / command frame */
- url_fskip(s->pb, size - 1);
+ url_fskip(s->pb, size);
continue;
}
} else {
@@ -400,13 +402,13 @@ static int flv_read_packet(AVFormatConte
get_be24(s->pb);
}
if (type == 0) {
- if ((ret = flv_get_extradata(s, st, size - 1)) < 0)
+ if ((ret = flv_get_extradata(s, st, size)) < 0)
return ret;
goto retry;
}
}
- ret= av_get_packet(s->pb, pkt, size - 1);
+ ret= av_get_packet(s->pb, pkt, size);
if (ret <= 0) {
return AVERROR(EIO);
}
More information about the ffmpeg-cvslog
mailing list