[libav-bugs] [Bug 1081] New: Closed captions are not exported

bugzilla at libav.org bugzilla at libav.org
Mon Sep 11 17:33:11 CEST 2017


https://bugzilla.libav.org/show_bug.cgi?id=1081

            Bug ID: 1081
           Summary: Closed captions are not exported
           Product: Libav
           Version: git HEAD
          Hardware: Other
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: ---
         Component: libavcodec
          Assignee: bugzilla at libav.org
          Reporter: jstml at outlook.com

Created attachment 682
  --> https://bugzilla.libav.org/attachment.cgi?id=682&action=edit
git diff file with my workaround

When decoding an interlaced h264 stream with closed captions. The captions are
not being exported.

This is happening because LibAv expects there to be SEI NAL units in both
fields of a frame. As stated in the comments in libavcodec/h264_slice.c line
1514.

The stream i used only has a SEI NAL unit in the first field. And not in the
second. If both fields do have SEI NAL units, the data from the first field is
moved to the second field libavcodec/h264_sei.c line 169. So the second field
holds the caption data for both fields.

But because my stream doesn't have a SEI NAL unit in the second field the data
from the first field is never copied. So when it exports the SEI data of the
second field to the frame's side data is doesn't copy anything.


Since MPEG and HEVC don't have a condition like H264 has in
libavcodec/h264_slice.c line 1516.

I made a temporary fix to always export closed captions if they are present.
See attachment.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20170911/a445aa31/attachment.html>


More information about the libav-bugs mailing list