Ticket #2044: v4l2_mpeg_64bit_and_audio_fix.diff

File v4l2_mpeg_64bit_and_audio_fix.diff, 1.7 KB (added by Janne <janne-mythtv@…>, 13 years ago)
  • libs/libmythtv/mpegrecorder.cpp

    old new bool MpegRecorder::SetV4L2DeviceOptions( 
    439439    if (audtype != 2)
    440440    {
    441441        VERBOSE(VB_IMPORTANT, LOC_WARN +
    442                 "MPEG Layer1 does not work properly with ivtv driver. "
    443                 "\n\t\t\tUsing MPEG layer 2 audio instead.");
     442                "Only MPEG Layer2 works properly with ivtv driver."
     443                " Setting bit rate to 224 kbps.");
     444        audbitrate = 11;
    444445    }
    445446
    446447    // only 48kHz works properly.
    bool MpegRecorder::SetV4L2DeviceOptions( 
    451452    ext_ctrl[1].value = aspectratio - 1;
    452453
    453454    ext_ctrl[2].id    = V4L2_CID_MPEG_AUDIO_ENCODING;
    454     ext_ctrl[2].value = audtype - 1;
     455    ext_ctrl[2].value = V4L2_MPEG_AUDIO_ENCODING_LAYER_2;
    455456
    456457    ext_ctrl[3].id    = V4L2_CID_MPEG_AUDIO_L2_BITRATE;
    457458    ext_ctrl[3].value = audbitrate - 1;
    bool MpegRecorder::SetV4L2DeviceOptions( 
    479480        else
    480481        {
    481482            VERBOSE(VB_IMPORTANT, LOC_ERR +
    482                     QString("Could not set MPEG controls %1 through %2.")
     483                    QString("Could not set MPEG controls %1 to value %2.")
    483484                    .arg(ctrls.error_idx)
    484485                    .arg(ext_ctrl[ctrls.error_idx].value) + ENO);
    485486        }
  • libs/libmythtv/videodev2_myth.h

    old new struct v4l2_ext_control 
    721721                __s64 value64;
    722722                void *reserved;
    723723        };
    724 };
     724}  __attribute__ ((packed));
    725725
    726726struct v4l2_ext_controls
    727727{