summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 65d9d44b50..1a9840a62c 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -449,8 +449,10 @@ static inline int parse_nal_units(AVCodecParserContext *s,
/* Decode POC of this picture.
* The prev_ values needed for decoding POC of the next picture are not set here. */
field_poc[0] = field_poc[1] = INT_MAX;
- ff_h264_init_poc(field_poc, &s->output_picture_number, sps,
+ ret = ff_h264_init_poc(field_poc, &s->output_picture_number, sps,
&p->poc, p->picture_structure, nal.ref_idc);
+ if (ret < 0)
+ goto fail;
/* Continue parsing to check if MMCO_RESET is present.
* FIXME: MMCO_RESET could appear in non-first slice.