Send seek event to baseparse when aacparse seek failed in push mode
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 17 Jan 2022 02:07:07 +0000 (11:07 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 21 Jan 2022 04:55:36 +0000 (13:55 +0900)
Change-Id: Ifcbb545a3d68c110a5442db216ec23ead9a9ca26

gst/audioparsers/gstaacparse.c

index 854b1d0..1fb5cb0 100644 (file)
@@ -2144,9 +2144,14 @@ gst_aac_parse_adts_src_eventfunc (GstBaseParse * parse, GstEvent * event)
         GstPad *srcpad = parse->srcpad;
         GST_INFO_OBJECT (aacparse, "aac parser is PUSH MODE.");
         /* check NULL */
-        if (aacparse->byte_seekable)
-          return gst_aac_audio_parse_do_push_seek (parse, srcpad, event);
-
+        if (aacparse->byte_seekable) {
+          ret = gst_aac_audio_parse_do_push_seek (parse, srcpad, event);
+          if (!ret) {
+            GST_INFO_OBJECT (aacparse, "PUSH mode seek() failed, Trying base seek()");
+            goto aac_seek_null_exit;
+          }
+          return ret;
+        }
         GST_INFO_OBJECT (aacparse, "not support byte seek");
         goto aac_seek_null_exit;
       }