diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-09-01 04:04:47 +0400 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-09-01 04:04:47 +0400 |
commit | eeeae2bf051a6a1bbd145423816e835ae082a0bf (patch) | |
tree | 75084d1c5f35aad5dd9394d959c0e97321d18182 /libavformat | |
parent | 4b7539f1cda0571a838c3c711aa56e5dc2be9073 (diff) |
gxf muxer only accepts pal or ntsc resolutions currently, so fail if resolution is something else
Originally committed as revision 25014 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/gxfenc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index b20a8420eb..55bba21579 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -678,12 +678,16 @@ static int gxf_write_header(AVFormatContext *s) 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) |