Skip to content

BitStreamFilter initialize failed #2066

@cmpute

Description

@cmpute

To reproduce: python -c "import av; print(av.bitstream.BitStreamFilterContext('h264_mp4toannexb'))"

Error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "av/bitstream.pyx", line 33, in av.bitstream.BitStreamFilterContext.__cinit__
  File "av/error.pyx", line 424, in av.error.err_check
av.error.ValueError: [Errno 22] Invalid argument

After some quick investigation, it might be related to av_bsf_init(self.ptr) was called without av_bsf_alloc being called. See https://github.com/PyAV-Org/PyAV/blob/main/av/bitstream.pyx#L32 and https://ffmpeg.org/doxygen/trunk/group__lavc__bsf.html#ga242529d54013acf87e94273d298a5ff2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions