wrong duration after seek

Patrick Fischer patrick.fischer at vitec.com
Thu Oct 20 06:55:40 UTC 2022


Hello

I am using gstreamer 1.20.3 for my mobile app.

My current problem is that I can't get a proper duration after seeing.

To seeken I use:

    if(!gst_element_seek_simple(customData->pipeline, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT),customData->seekToPos))



    {

        LOGW ("Seek failed!\n");

        ...

      

to query the duration:

            gint64 duration = 0;

            if (!gst_element_query_duration (mCustomData.pipeline, GST_FORMAT_TIME, &duration)) {

                g_print("Could not query current duration.\n");

                return 0;

            }

Source of the video is a http stream mpegts (aac/h264)

The problem is that I often get a duration of 0 or very small values (e.g. 37) back after the seeken. Even if I query more often.

does anyone have an idea what this could be?

regards
Patrick

Patrick Fischer
Software Developer
o: 
+49 4307 8358 0
patrick.fischer at vitec.com
www.vitec.com


Legal Notice
 Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. Neither VITEC S.A. (66 Avenue des Champs Elysées – 75008 Paris - France) nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. VITEC GmbH, Lise-Meitner-Str. 15, 24223 Schwentinental
 Geschäftsführer/Managing Director: Philippe Wetzel
 HRB Plön 1584 / Steuernummer: 2029706365 / VATnumber: DE134878603
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221020/27892d69/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image035332.png
Type: image/png
Size: 30451 bytes
Desc: image035332.png
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221020/27892d69/attachment-0001.png>


More information about the gstreamer-devel mailing list