summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-04 18:09:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-04 18:09:18 +0200
commit8f4b176c55f05291c85a32d55e07db1612bf93ea (patch)
tree4a3a856f5a23f219a19140fc57467b52c318d41f /libavcodec/dvbsubdec.c
parentdeadcf5e71bbdadf21fa7bd40fc9a22a6e1abb7c (diff)
avcodec/dvbsubdec: add some basic av_log debuging support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 9d74b1a0c0..1809e9d8e0 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1495,6 +1495,10 @@ static int dvbsub_decode(AVCodecContext *avctx,
segment_length = AV_RB16(p);
p += 2;
+ if (avctx->debug & FF_DEBUG_STARTCODE) {
+ av_log(avctx, AV_LOG_DEBUG, "segment_type:%d page_id:%d segment_length:%d\n", segment_type, page_id, segment_length);
+ }
+
if (p_end - p < segment_length) {
av_dlog(avctx, "incomplete or broken packet");
return -1;
@@ -1538,8 +1542,10 @@ static int dvbsub_decode(AVCodecContext *avctx,
}
// Some streams do not send a display segment but if we have all the other
// segments then we need no further data.
- if (got_segment == 15 && sub)
+ if (got_segment == 15 && sub) {
+ av_log(avctx, AV_LOG_DEBUG, "Missing display_end_segment, emulating\n");
*data_size = dvbsub_display_end_segment(avctx, p, 0, sub);
+ }
return p - buf;
}