vpxdec: Don't memcpy in frame map failed

This avoid a crash if mapping the frame failed.
This commit is contained in:
Nicolas Dufresne 2015-03-01 13:52:50 -05:00
parent 8e75acc7b7
commit 1521f65e8d
2 changed files with 2 additions and 0 deletions

View file

@ -378,6 +378,7 @@ gst_vp8_dec_image_to_buffer (GstVP8Dec * dec, const vpx_image_t * img,
if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) {
GST_ERROR_OBJECT (dec, "Could not map video buffer"); GST_ERROR_OBJECT (dec, "Could not map video buffer");
return;
} }
for (comp = 0; comp < 3; comp++) { for (comp = 0; comp < 3; comp++) {

View file

@ -375,6 +375,7 @@ gst_vp9_dec_image_to_buffer (GstVP9Dec * dec, const vpx_image_t * img,
if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) {
GST_ERROR_OBJECT (dec, "Could not map video buffer"); GST_ERROR_OBJECT (dec, "Could not map video buffer");
return;
} }
for (comp = 0; comp < 3; comp++) { for (comp = 0; comp < 3; comp++) {