From: Jan Schmidt Date: Fri, 21 Jan 2022 14:30:57 +0000 (+1100) Subject: gst-play: Fix trick-mode handling. X-Git-Tag: 1.22.0~2353 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1726361622ee9ed52ba6f3cba9eb5efbd50583a5;p=platform%2Fupstream%2Fgstreamer.git gst-play: Fix trick-mode handling. The instant-rate value in the TrickMode enum is a flag, but the other values are not. Move instant-rate to the end of the enum and give it a value large enough for it to be used without modifying the trick-mode setting. Part-of: --- diff --git a/subprojects/gst-plugins-base/tools/gst-play.c b/subprojects/gst-plugins-base/tools/gst-play.c index 508800a..66b4e8d 100644 --- a/subprojects/gst-plugins-base/tools/gst-play.c +++ b/subprojects/gst-plugins-base/tools/gst-play.c @@ -61,8 +61,14 @@ typedef enum GST_PLAY_TRICK_MODE_DEFAULT_NO_AUDIO, GST_PLAY_TRICK_MODE_KEY_UNITS, GST_PLAY_TRICK_MODE_KEY_UNITS_NO_AUDIO, - GST_PLAY_TRICK_MODE_INSTANT_RATE, - GST_PLAY_TRICK_MODE_LAST + GST_PLAY_TRICK_MODE_LAST, + + /* The instant-rate setting is a flag, + * applied on top of the trick-mode enum value. + * It needs to have a 2^n value bigger than + * any of the enum values so setting it + * won't affect the trickmode value */ + GST_PLAY_TRICK_MODE_INSTANT_RATE = (1 << 3) } GstPlayTrickMode; typedef enum