[FFmpeg-devel] [PATCH 1/3 v2] avcodec: add an AVCodecContext field to signal types of packet, frame, and coded stream side data to export
James Almer
jamrial at gmail.com
Tue Feb 11 15:19:55 EET 2020
On 2/11/2020 10:06 AM, Michael Niedermayer wrote:
> On Mon, Feb 10, 2020 at 07:40:39PM -0300, James Almer wrote:
>> On 2/10/2020 7:14 PM, Michael Niedermayer wrote:
>>> On Mon, Feb 10, 2020 at 03:26:44PM -0300, James Almer wrote:
>>>> Add an initial mvs flag to is, analog to the export_mvs flags2 one.
>>>>
>>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>>> ---
>>>> libavcodec/avcodec.h | 18 ++++++++++++++++++
>>>> libavcodec/mpegpicture.c | 2 +-
>>>> libavcodec/mpegutils.c | 2 +-
>>>> libavcodec/options_table.h | 2 ++
>>>> libavcodec/snowdec.c | 2 +-
>>>> libavcodec/utils.c | 3 +++
>>>> tests/ref/fate/api-mjpeg-codec-param | 2 ++
>>>> tests/ref/fate/api-png-codec-param | 2 ++
>>>> 8 files changed, 30 insertions(+), 3 deletions(-)
>>>
>>> Breaks
>>> ./ffplay -debug 16384 -flags2 +export_mvs -i panda.mp4 -vf codecview=mv=pf+bf+bb
>>
>> Broken how?
>
> The filter no longer shows any motion vectors after this patch
>
> Thanks
What codec does that file use? I see some modules copying flags2 from
one avctx to another (pthread_frame, tdsc, tiff, imm5), so i'm inclined
to think this may be an issue with keeping the avctx user values synced
between threads.
Does the following change fix it?
> diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
> index 36ac0ac1e5..b5bd494474 100644
> --- a/libavcodec/pthread_frame.c
> +++ b/libavcodec/pthread_frame.c
> @@ -334,6 +334,7 @@ static int update_context_from_user(AVCodecContext *dst, AVCodecContext *src)
>
> dst->slice_flags = src->slice_flags;
> dst->flags2 = src->flags2;
> + dst->export_side_data = src->export_side_data;
>
> copy_fields(skip_loop_filter, subtitle_header);
If not, i could use that sample.
More information about the ffmpeg-devel
mailing list