Commit b596102e authored by Baptiste Coudurier's avatar Baptiste Coudurier

check codec frame size directly and only for audio

Originally committed as revision 7280 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2f5560ee
...@@ -1518,12 +1518,12 @@ static int mov_write_header(AVFormatContext *s) ...@@ -1518,12 +1518,12 @@ static int mov_write_header(AVFormatContext *s)
default: default:
track->sampleSize = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels; track->sampleSize = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels;
} }
} if (!st->codec->frame_size) {
if (!track->sampleDuration) { av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i);
av_log(s, AV_LOG_ERROR, "track %d: sample duration is not set\n", i);
return -1; return -1;
} }
} }
}
mov_write_mdat_tag(pb, mov); mov_write_mdat_tag(pb, mov);
mov->time = s->timestamp + 0x7C25B080; //1970 based -> 1904 based mov->time = s->timestamp + 0x7C25B080; //1970 based -> 1904 based
......
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