mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
don't crash on null codec; by matthieu castet <castet DOT matthieu AT free DOT fr>
Originally committed as revision 3894 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
46103f6bbd
commit
25cf9062ba
@ -515,9 +515,9 @@ static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
|
||||
put_be16(pb, 1); /* Frame count (= 1) */
|
||||
|
||||
memset(compressor_name,0,32);
|
||||
if (track->enc->codec->name)
|
||||
if (track->enc->codec && track->enc->codec->name)
|
||||
strncpy(compressor_name,track->enc->codec->name,31);
|
||||
put_byte(pb, FFMAX(strlen(compressor_name),32) );
|
||||
put_byte(pb, strlen(compressor_name));
|
||||
put_buffer(pb, compressor_name, 31);
|
||||
|
||||
put_be16(pb, 0x18); /* Reserved */
|
||||
|
Loading…
Reference in New Issue
Block a user