Commit 383e5214 authored by mmu_man's avatar mmu_man

don't crash on null codec; by matthieu castet <castet DOT matthieu AT free DOT fr>


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3894 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 14074e2d
...@@ -515,9 +515,9 @@ static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track) ...@@ -515,9 +515,9 @@ static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
put_be16(pb, 1); /* Frame count (= 1) */ put_be16(pb, 1); /* Frame count (= 1) */
memset(compressor_name,0,32); 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); 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_buffer(pb, compressor_name, 31);
put_be16(pb, 0x18); /* Reserved */ put_be16(pb, 0x18); /* Reserved */
......
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