summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h261.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpdec_h261.c')
-rw-r--r--libavformat/rtpdec_h261.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpdec_h261.c b/libavformat/rtpdec_h261.c
index a102909c60..57bc10fb3d 100644
--- a/libavformat/rtpdec_h261.c
+++ b/libavformat/rtpdec_h261.c
@@ -119,7 +119,9 @@ static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx
} else {
/* ebit/sbit values inconsistent, assuming packet loss */
GetBitContext gb;
- init_get_bits(&gb, buf, len*8 - ebit);
+ res = init_get_bits(&gb, buf, len*8 - ebit);
+ if (res < 0)
+ return res;
skip_bits(&gb, sbit);
if (rtp_h261_ctx->endbyte_bits) {
rtp_h261_ctx->endbyte |= get_bits(&gb, 8 - rtp_h261_ctx->endbyte_bits);