Ticket #3351: patchimx.diff

File patchimx.diff, 777 bytes (added by Carl Eugen Hoyos, 12 years ago)
  • libavformat/movenc.c

    diff --git a/libavformat/movenc.c b/libavformat/movenc.c
    index a886ab0..e6d7550 100644
    a b static AVRational find_fps(AVFormatContext *s, AVStream *st)  
    901901
    902902static int mov_get_mpeg2_xdcam_codec_tag(AVFormatContext *s, MOVTrack *track)
    903903{
    904     int tag = MKTAG('m', '2', 'v', '1'); //fallback tag
     904    int tag = track->enc->codec_tag;
    905905    int interlaced = track->enc->field_order > AV_FIELD_PROGRESSIVE;
    906906    AVStream *st = track->st;
    907907    int rate = av_q2d(find_fps(s, st));
    908908
     909    if (!tag)
     910        tag = MKTAG('m', '2', 'v', '1'); //fallback tag
     911
    909912    if (track->enc->pix_fmt == AV_PIX_FMT_YUV420P) {
    910913        if (track->enc->width == 1280 && track->enc->height == 720) {
    911914            if (!interlaced) {