summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-13 13:52:01 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-13 14:22:31 +0200
commitfd6296e412ed07829a544bca55d987fb32809b2d (patch)
tree00aea171dfd8b6d2b1b413de53257c0cbbb60558
parent6bed88ac78c292edb4714e035957d76b3e4cbff7 (diff)
downloadffmpeg-streaming-fd6296e412ed07829a544bca55d987fb32809b2d.zip
ffmpeg-streaming-fd6296e412ed07829a544bca55d987fb32809b2d.tar.gz
avformat/flvdec: Print last packet size at trace level
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/flvdec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 519c8d9..148c5be 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -801,15 +801,16 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
int av_uninit(channels);
int av_uninit(sample_rate);
AVStream *st = NULL;
+ int last = -1;
/* pkt size is repeated at end. skip it */
- for (;; avio_skip(s->pb, 4)) {
+ for (;; last = avio_rb32(s->pb)) {
pos = avio_tell(s->pb);
type = (avio_r8(s->pb) & 0x1F);
size = avio_rb24(s->pb);
dts = avio_rb24(s->pb);
dts |= avio_r8(s->pb) << 24;
- av_log(s, AV_LOG_TRACE, "type:%d, size:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, dts, avio_tell(s->pb));
+ av_log(s, AV_LOG_TRACE, "type:%d, size:%d, last:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, last, dts, avio_tell(s->pb));
if (avio_feof(s->pb))
return AVERROR_EOF;
avio_skip(s->pb, 3); /* stream id, always 0 */
OpenPOWER on IntegriCloud