Commit ed7fa39c authored by Aurelien Jacobs's avatar Aurelien Jacobs

Check return value of avc_parse_nal_units().

Originally committed as revision 11495 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent f739b36d
......@@ -488,7 +488,9 @@ static int mov_write_avcc_tag(ByteIOContext *pb, MOVTrack *track)
uint32_t sps_size=0, pps_size=0;
uint8_t *sps=0, *pps=0;
avc_parse_nal_units(&track->vosData, &track->vosLen);
int ret = avc_parse_nal_units(&track->vosData, &track->vosLen);
if (ret < 0)
return ret;
buf = track->vosData;
end = track->vosData + track->vosLen;
......@@ -1635,7 +1637,9 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
if (enc->codec_id == CODEC_ID_H264 && trk->vosLen > 0 && *(uint8_t *)trk->vosData != 1) {
/* from x264 or from bytestream h264 */
/* nal reformating needed */
avc_parse_nal_units(&pkt->data, &pkt->size);
int ret = avc_parse_nal_units(&pkt->data, &pkt->size);
if (ret < 0)
return ret;
assert(pkt->size);
size = pkt->size;
} else if (enc->codec_id == CODEC_ID_DNXHD && !trk->vosLen) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment