After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796042 - avviddec: Support draining for some decoders
avviddec: Support draining for some decoders
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-libav
1.14.0
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-12 10:45 UTC by Yeongjin Jeong
Modified: 2018-11-03 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
avviddec: Support draining for some decoders (2.23 KB, patch)
2018-05-12 10:45 UTC, Yeongjin Jeong
none Details | Review
avviddec: Support draining for some decoders (1.48 KB, patch)
2018-05-15 02:21 UTC, Yeongjin Jeong
none Details | Review

Description Yeongjin Jeong 2018-05-12 10:45:06 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.
Comment 1 Nicolas Dufresne (ndufresne) 2018-05-12 18:47:28 UTC
Review of attachment 371951 [details] [review]:

Now we have two drain functions, can you briefly explain why this is needed ?
Comment 2 Yeongjin Jeong 2018-05-15 02:00:58 UTC
(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.
Comment 3 Yeongjin Jeong 2018-05-15 02:21:29 UTC
Created attachment 372043 [details] [review]
avviddec: Support draining for some decoders
Comment 4 GStreamer system administrator 2018-11-03 12:58:52 UTC
-- 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.