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 781918 - mpegvideoparse calculates wrong pixel aspect ratio
mpegvideoparse calculates wrong pixel aspect ratio
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-28 18:49 UTC by Matej Knopp
Modified: 2018-11-03 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (2.05 KB, patch)
2017-04-28 18:49 UTC, Matej Knopp
none Details | Review

Description Matej Knopp 2017-04-28 18:49:04 UTC
Created attachment 350679 [details] [review]
Patch

If there is no sequence extension or sequence display extension present gst_mpeg_video_finalise_mpeg2_sequence_header will never be called and will not calculate proper aspect ratio.

it's safe to call gst_mpeg_video_finalise_mpeg2_sequence_header without sequence extension, in which case it calculates aspect ratio from sequence header width/height and DAR.
Comment 1 Sebastian Dröge (slomo) 2017-05-02 11:14:08 UTC
Can you provide a sample file where this patch helps?
Comment 2 Matej Knopp 2017-05-03 13:59:41 UTC
Actually, I can't. The file in question does have sequence extension, so it was a false alarm. The issue was that my (customized) avformat based demuxer pushes sequence header as codec data, but gst_mpegv_parse_process_config called from gst_mpegv_parse_set_caps only parses sequence header from codec data and doesn't bother with sequence extension.

So sample file wouldn't help here, because gstreamer mpeg demuxer doesn't send codec_data, whereas the avdemux based one also parses the stream and sends codec data.

For now I just "fixed" the demuxer to not output codec data for mpeg stream, as it's not really necessary. Still, I think the parser should perhaps either ignore codec_data or try to parse both sequence and sequence extension.
Comment 3 Sebastian Dröge (slomo) 2017-05-09 12:46:37 UTC
It should parse as codec_data whatever it receives and can parse, yes. Could you do that?
Comment 4 GStreamer system administrator 2018-11-03 14:08:04 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-plugins-bad/issues/552.