comparison gxfenc.c @ 6450:341de8787590 libavformat

gxf muxer only accepts pal or ntsc resolutions currently, so fail if resolution is something else
author bcoudurier
date Wed, 01 Sep 2010 00:04:47 +0000
parents e8dfc68ad182
children
comparison
equal deleted inserted replaced
6449:3a28e6827095 6450:341de8787590
676 if (st->codec->height == 480 || st->codec->height == 512) { /* NTSC or NTSC+VBI */ 676 if (st->codec->height == 480 || st->codec->height == 512) { /* NTSC or NTSC+VBI */
677 sc->frame_rate_index = 5; 677 sc->frame_rate_index = 5;
678 sc->sample_rate = 60; 678 sc->sample_rate = 60;
679 gxf->flags |= 0x00000080; 679 gxf->flags |= 0x00000080;
680 gxf->time_base = (AVRational){ 1001, 60000 }; 680 gxf->time_base = (AVRational){ 1001, 60000 };
681 } else { /* assume PAL */ 681 } else if (st->codec->height == 576 || st->codec->height == 608) { /* PAL or PAL+VBI */
682 sc->frame_rate_index = 6; 682 sc->frame_rate_index = 6;
683 sc->media_type++; 683 sc->media_type++;
684 sc->sample_rate = 50; 684 sc->sample_rate = 50;
685 gxf->flags |= 0x00000040; 685 gxf->flags |= 0x00000040;
686 gxf->time_base = (AVRational){ 1, 50 }; 686 gxf->time_base = (AVRational){ 1, 50 };
687 } else {
688 av_log(s, AV_LOG_ERROR, "unsupported video resolution, "
689 "gxf muxer only accepts PAL or NTSC resolutions currently\n");
690 return -1;
687 } 691 }
688 av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); 692 av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den);
689 if (gxf_find_lines_index(st) < 0) 693 if (gxf_find_lines_index(st) < 0)
690 sc->lines_index = -1; 694 sc->lines_index = -1;
691 sc->sample_size = st->codec->bit_rate; 695 sc->sample_size = st->codec->bit_rate;