# HG changeset patch # User bcoudurier # Date 1283299487 0 # Node ID 341de8787590a50ca08a20cfeec128b5efb3b882 # Parent 3a28e68270950e8a7291085e8aa2ad36a1e264f0 gxf muxer only accepts pal or ntsc resolutions currently, so fail if resolution is something else diff -r 3a28e6827095 -r 341de8787590 gxfenc.c --- a/gxfenc.c Tue Aug 31 07:15:11 2010 +0000 +++ b/gxfenc.c Wed Sep 01 00:04:47 2010 +0000 @@ -678,12 +678,16 @@ sc->sample_rate = 60; gxf->flags |= 0x00000080; gxf->time_base = (AVRational){ 1001, 60000 }; - } else { /* assume PAL */ + } else if (st->codec->height == 576 || st->codec->height == 608) { /* PAL or PAL+VBI */ sc->frame_rate_index = 6; sc->media_type++; sc->sample_rate = 50; gxf->flags |= 0x00000040; gxf->time_base = (AVRational){ 1, 50 }; + } else { + av_log(s, AV_LOG_ERROR, "unsupported video resolution, " + "gxf muxer only accepts PAL or NTSC resolutions currently\n"); + return -1; } av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); if (gxf_find_lines_index(st) < 0)