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 697548 - avviddec: Setting same caps resets decoder
avviddec: Setting same caps resets decoder
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
1.0.5
Other All
: Normal normal
: 1.0.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-08 11:40 UTC by Siva Chandran P
Modified: 2013-04-09 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for the issue (656 bytes, patch)
2013-04-08 11:43 UTC, Siva Chandran P
committed Details | Review

Description Siva Chandran P 2013-04-08 11:40:17 UTC
Inside gst_ffmpegviddec_set_format function of gstavviddec.c file, we attempt to make sure that the new caps is not the same one we already have and we avoid draining and closing/resetting the decoder.

But because we set the 'last_caps' to the new caps before we close/reset the decoder, the last_caps is reset to NULL immediately after we setting it to the new caps. Due to this we are not able to detect whether the given caps is new one or the one the decoder is already configured for.

This makes the decoder to get reset every time we set the caps even if the decoder is already configured for the given caps.
Comment 1 Siva Chandran P 2013-04-08 11:43:33 UTC
Created attachment 240938 [details] [review]
Fix for the issue

The fix for the issue is attached
Comment 2 Sebastian Dröge (slomo) 2013-04-09 18:42:46 UTC
commit 77edec961b5bd4ffb6cf254fb040925b524a27d0
Author: Siva Chandran P <siva.chandran.p@gmail.com>
Date:   Tue Apr 9 20:40:06 2013 +0200

    avvidec: Make sure to store newly set caps after resetting the decoder
    
    Otherwise we'll just set the to NULL while resetting the decoder and
    don't have them available anymore later.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697548