Skip to content
Snippets Groups Projects
Commit c9ac0827 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

movenc: Dont crash on aspect=0/0.

parent c36010c2
No related branches found
No related tags found
No related merge requests found
...@@ -1582,7 +1582,7 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov, ...@@ -1582,7 +1582,7 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_udta_sdp(pb, track->rtp_ctx, track->track_id); mov_write_udta_sdp(pb, track->rtp_ctx, track->track_id);
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) { if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) {
double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio); double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
if (0.0 != sample_aspect_ratio && 1.0 != sample_aspect_ratio) if (st->sample_aspect_ratio.num && 1.0 != sample_aspect_ratio)
mov_write_tapt_tag(pb, track); mov_write_tapt_tag(pb, track);
}; };
return update_size(pb, pos); return update_size(pb, pos);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment