mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 21:45:10 +00:00
Check return value of avc_parse_nal_units().
Originally committed as revision 11495 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f739b36d16
commit
ed7fa39c2d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user