Ticket #10706: 10bitfix.patch

File 10bitfix.patch, 1.7 KB (added by slackerlinux85@…, 10 years ago)

should fix 9/10bit content and MJPEG content in mythtv

  • mythtv/libs/libmythtv/avformatdecoder.cpp

    diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
    index 3a42b40..9908ca6 100644
    a b bool AvFormatDecoder::ProcessVideoFrame(AVStream *stream, AVFrame *mpa_pic) 
    35193519    picframe->frameNumber      = framesPlayed;
    35203520    picframe->aspect           = current_aspect;
    35213521    picframe->dummy            = 0;
     3522    if(directrendering)
     3523      picframe->directrendering = 1;
     3524    else
     3525      picframe->directrendering = 0;
    35223526
    35233527    m_parent->ReleaseNextVideoFrame(picframe, temppts);
    35243528    if (private_dec)
  • mythtv/libs/libmythtv/frame.h

    diff --git a/mythtv/libs/libmythtv/frame.h b/mythtv/libs/libmythtv/frame.h
    index 1e59abe..6d852d0 100644
    a b typedef struct VideoFrame_ 
    5858    int offsets[3]; // Y, U, & V offsets
    5959
    6060    int pix_fmt;
     61    int directrendering;
    6162} VideoFrame;
    6263
    6364#ifdef __cplusplus
    static inline void init(VideoFrame *vf, VideoFrameType _codec, 
    101102    vf->forcekey         = 0;
    102103    vf->dummy            = 0;
    103104    vf->pix_fmt          = 0;
     105    vf->directrendering  = 0;
    104106
    105107    memset(vf->priv, 0, 4 * sizeof(unsigned char *));
    106108
  • mythtv/libs/libmythtv/videobuffers.cpp

    diff --git a/mythtv/libs/libmythtv/videobuffers.cpp b/mythtv/libs/libmythtv/videobuffers.cpp
    index 95e0eec..16f1e34 100644
    a b void VideoBuffers::ReleaseFrame(VideoFrame *frame) 
    309309
    310310    vpos = vbufferMap[frame];
    311311    limbo.remove(frame);
    312     decode.enqueue(frame);
     312    //non directrendering frames are ffmpeg handled
     313    if(frame->directrendering != 0)
     314      decode.enqueue(frame);
    313315    used.enqueue(frame);
    314316}
    315317