codecparsers: {h264,h265}bitwriter: Remove redundant condition checks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3967>
This commit is contained in:
Mengkejiergeli Ba 2023-02-15 09:45:28 +08:00
parent 817339c4de
commit 585d2d93f6
2 changed files with 3 additions and 4 deletions

View file

@ -1492,8 +1492,7 @@ gst_h264_bit_writer_aud (guint8 primary_pic_type, gboolean start_code,
gboolean have_space = TRUE;
GstBitWriter bw;
g_return_val_if_fail (primary_pic_type >= 0
&& primary_pic_type <= 7, GST_H264_BIT_WRITER_ERROR);
g_return_val_if_fail (primary_pic_type <= 7, GST_H264_BIT_WRITER_ERROR);
g_return_val_if_fail (data != NULL, GST_H264_BIT_WRITER_ERROR);
g_return_val_if_fail (size != NULL, GST_H264_BIT_WRITER_ERROR);
g_return_val_if_fail (*size > 0, GST_H264_BIT_WRITER_ERROR);

View file

@ -1792,8 +1792,8 @@ gst_h265_bit_writer_slice_hdr (const GstH265SliceHdr * slice,
g_return_val_if_fail (data != NULL, GST_H265_BIT_WRITER_ERROR);
g_return_val_if_fail (size != NULL, GST_H265_BIT_WRITER_ERROR);
g_return_val_if_fail (*size > 0, GST_H265_BIT_WRITER_ERROR);
g_return_val_if_fail (nal_type >= GST_H265_NAL_SLICE_TRAIL_N &&
nal_type <= GST_H265_NAL_SLICE_CRA_NUT, GST_H265_BIT_WRITER_ERROR);
g_return_val_if_fail (nal_type <= GST_H265_NAL_SLICE_CRA_NUT,
GST_H265_BIT_WRITER_ERROR);
gst_bit_writer_init_with_data (&bw, data, *size, FALSE);