Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] libavdevice/decklink: extend available actions on signal loss
Date: Tue, 14 May 2024 21:39:39 +0200 (CEST)
Message-ID: <3be8ccc0-119b-a2a1-15b8-a6c999687d11@passwd.hu> (raw)
In-Reply-To: <6c4c27be-ac9b-4351-be6a-b3dc347843f1@nativewaves.com>



On Tue, 14 May 2024, Michael Riedl wrote:

>>
>>> Deprecate the option 'draw_bars' in favor of the new option 'signal_loss_action',
>>> which controls the behavior when the input signal is not available
>>> (including the behavior previously available through draw_bars).
>>> The default behavior remains unchanged to be backwards compatible.
>>> The new option is more flexible for extending now and in the future.
>>>
>>> The new value 'repeat' repeats the last video frame.
>>> This is useful for very short dropouts and was not available before.
>>
>> As far as I see, you are overriding frameBytes for a repeated frame, that seems wrong. pkt.data (frameBytes) must be associated with the videoFrame which is passed to av_buffer_create() later on.
>>
>> Every AVFrame returned by the decklink device has an AVBuffer set up which
>> keeps a reference to the original DeckLink frame. This allows the use of the DeckLink frame's raw buffer directly. But you cannot use the raw buffer of another DeckLink frame for which the AVBuffer of the AVFrame does not keep a reference.
>
> Thank you for your feedback!
>
> I took another look at the code and revisited the DeckLink documentation 
> to ensure my understanding was correct. It seems that frameBytes is a 
> pointer to the buffer of an IDeckLinkVideoFrame, and it remains valid as 
> long as the videoFrame is not released.

That is just it. You are releasing the repeated frame as soon as a valid 
frame comes in. The AVPacket data you previously returned will still point 
to the now released frameBytes. As I wrote above, the decklink frame 
corresponding to the returned frameBytes must be released in the 
destructor of the AVPacket buffer.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2024-05-14 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  8:25 Michael Riedl
2024-05-07 22:47 ` Marton Balint
2024-05-14  9:42   ` Michael Riedl
2024-05-14 19:39     ` Marton Balint [this message]
2024-05-21  8:15       ` Michael Riedl
2024-06-11  9:19       ` [FFmpeg-devel] [PATCH v4] " Michael Riedl
2024-06-11  9:46         ` Michael Riedl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3be8ccc0-119b-a2a1-15b8-a6c999687d11@passwd.hu \
    --to=cus@passwd.hu \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git