GNOME Bugzilla – Bug 781918
mpegvideoparse calculates wrong pixel aspect ratio
Last modified: 2018-11-03 14:08: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.
Can you provide a sample file where this patch helps?
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.
It should parse as codec_data whatever it receives and can parse, yes. Could you do that?
-- 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.