GNOME Bugzilla – Bug 796042
avviddec: Support draining for some decoders
Last modified: 2018-11-03 12:58:52 UTC
Created attachment 371951 [details] [review] avviddec: Support draining for some decoders Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input and output. It means that for some packets they will not immediately produce decoded output and need to be flushed at the end of decoding to get all the decoded data. However, even if AV_CODEC_CAP_DELAY is not set, there are decoders that need to be flushed if they work on multi-threads. I experienced that the frame is not drained when I using the ffmpeg native PNG decoder. e.g. gst-launch-1.0 filesrc location="png file location" ! pngparse ! avdec_png ! autovideoconvert gst-play-1.0 "png file location" Note.) If you use ffmpeg native PNG decoder and set the thread_count to 1 in codecCtx, decoding will be done without draining. So you must be set thread_count more than 1 to test.
Review of attachment 371951 [details] [review]: Now we have two drain functions, can you briefly explain why this is needed ?
(In reply to Nicolas Dufresne (ndufresne) from comment #1) > Review of attachment 371951 [details] [review] [review]: > > Now we have two drain functions, can you briefly explain why this is needed ? I think I did make a mistake. It does not need to have two functions, it is right to drain unconditionally.
Created attachment 372043 [details] [review] avviddec: Support draining for some decoders
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/38.