GNOME Bugzilla – Bug 763968
qtdemux: Add check condition for fail case in get_duration function
Last modified: 2016-03-24 12:38:18 UTC
Currently, get_duration function always return the TRUE value even though it can't be set the duration correctly. So, we need to add the else condition about the fail case. So I have modify it and related caller function.
Created attachment 324407 [details] [review] qtdemux: Add check condition for fail case in get_duration function
Review of attachment 324407 [details] [review]: ::: gst/isomp4/qtdemux.c @@ +834,3 @@ + + gst_qtdemux_get_duration (qtdemux, &duration); + if (duration > 0) { Why do you remove the check for the return value here? @@ +4422,3 @@ + if (G_UNLIKELY (QTSEGMENT_IS_EMPTY (&stream-> + segments[stream->segment_index]))) { No useless indentation changes please :) @@ +5187,3 @@ /* If we're doing a keyframe-only trickmode, only push keyframes on video streams */ + if (G_UNLIKELY (qtdemux->segment. + flags & GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS)) { No useless indentation changes please :)
(In reply to Sebastian Dröge (slomo) from comment #2) > Review of attachment 324407 [details] [review] [review]: > > ::: gst/isomp4/qtdemux.c > @@ +834,3 @@ > + > + gst_qtdemux_get_duration (qtdemux, &duration); > + if (duration > 0) { > > Why do you remove the check for the return value here? > > @@ +4422,3 @@ > > + if (G_UNLIKELY (QTSEGMENT_IS_EMPTY (&stream-> > + segments[stream->segment_index]))) { > > No useless indentation changes please :) > > @@ +5187,3 @@ > /* If we're doing a keyframe-only trickmode, only push keyframes on video > streams */ > + if (G_UNLIKELY (qtdemux->segment. > + flags & GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS)) { > > No useless indentation changes please :) Actually, I use the gst-indent tools about the qtdemux.c file. But If you don't agree it, I'll modify it.:)
Created attachment 324518 [details] [review] qtdemux: Add check condition for fail case in get_duration function
Attachment 324518 [details] pushed as c633f2a - qtdemux: Add check condition for fail case in get_duration function