Ticket #5952: libs_libavcodec-vdpau-pointer-checking-ticket-5952.patch

File libs_libavcodec-vdpau-pointer-checking-ticket-5952.patch, 1.2 KB (added by Erik Hovland <erik@…>, 17 years ago)

Fresh patch for old ticket.

  • mythtv/libs/libavcodec/vdpauvideo.c

    Make sure all pointers are valid in the vdpau code.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libavcodec/vdpauvideo.c |    6 ------
     1 files changed, 0 insertions(+), 6 deletions(-)
    
    
    diff --git a/mythtv/libs/libavcodec/vdpauvideo.c b/mythtv/libs/libavcodec/vdpauvideo.c
    index b9abfc3..d9b9f71 100644
    a b int VDPAU_mpeg_field_start(MpegEncContext *s)  
    111111        if (last->magic != MP_VDPAU_RENDER_MAGIC) {
    112112            return -1;
    113113        }
    114         if (last == NULL) { // FIXME: Does this test make sense?
    115             last = render; // predict second field from the first
    116         }
    117114        render->info.mpeg.forward_reference = last->surface;
    118115        return 0;
    119116    }
    int VDPAU_vc1_decode_picture(MpegEncContext *s, AVCodecContext *avctx, VC1Contex  
    400397        if (last->magic != MP_VDPAU_RENDER_MAGIC) {
    401398            return -1;
    402399        }
    403         if (last == NULL) { // FIXME: Does this test make sense?
    404             last = render; // predict second field from the first
    405         }
    406400        render->info.vc1.forward_reference = last->surface;
    407401        break;
    408402    default: