Commit 6cc2ad47 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

avidemux: rearrange some checks to avoid NULL use

parent 6cb106d6
......@@ -4468,6 +4468,11 @@ gst_avi_demux_invert (GstAviStream * stream, GstBuffer * buf)
if (stream->strh->type != GST_RIFF_FCC_vids)
return buf;
if (stream->strf.vids == NULL) {
GST_WARNING ("Failed to retrieve vids for stream");
return buf;
}
fourcc = (stream->strf.vids->compression) ?
stream->strf.vids->compression : stream->strh->fcc_handler;
if (!gst_avi_demux_is_uncompressed (fourcc)) {
......@@ -4483,11 +4488,6 @@ gst_avi_demux_invert (GstAviStream * stream, GstBuffer * buf)
return buf;
}
if (stream->strf.vids == NULL) {
GST_WARNING ("Failed to retrieve vids for stream");
return buf;
}
h = stream->strf.vids->height;
w = stream->strf.vids->width;
stride = GST_ROUND_UP_4 (w * (bpp / 8));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment