FFmpeg decoder: discard unused streams and check decoder setup

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
swift
Domain
backend

Research direction

Start with FFmpeg.swift and FFStream.swift, then trace how streams are selected, decoder setup is handled, and EOF is reached. Check the FFmpeg API behavior for stream discard settings and decoder flushing. Done means unused audio/video and text subtitle streams are discarded, decoder setup failures are handled, and decoders are flushed at EOF.

Written by the indexing model from the issue text.

Description

enhancement

In FFmpeg.swift / FFStream.swift:

  • non-subtitle streams are not set to AVDISCARD_ALL, so the demuxer does full work for video/audio packets;
  • text subtitle streams are decoded for nothing (only bitmap subtitles are used);
  • avcodec_find_decoder, avcodec_parameters_to_context and avcodec_open2 results are not checked;
  • decoders are not flushed at EOF.
Dominant language
Swift
Stars
42
Forks
9
Avg merge
9h 30m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ecdye/macSubtitleOCR

All issues in ecdye/macSubtitleOCR

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.