mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-04 22:48:54 +00:00
avidemux: rearrange some checks to avoid NULL use
This commit is contained in:
parent
6cb106d690
commit
6cc2ad4744
1 changed files with 5 additions and 5 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue