Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Stephen Hutchinson <qyot27@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized
Date: Sat, 19 Feb 2022 19:05:02 -0500
Message-ID: <041a5df3-7ede-9e4b-f77b-b0a5e9346ed2@gmail.com> (raw)
In-Reply-To: <AM7PR03MB666094A3BA22FDBF13E358098F389@AM7PR03MB6660.eurprd03.prod.outlook.com>

On 2/19/22 5:45 PM, Andreas Rheinhardt wrote:
> Stephen Hutchinson:
>> Addresses Coverity issue 1500290
>>
>> Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
>> ---
>>   libavformat/avisynth.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
>> index 03489f180f..cfb7b2a783 100644
>> --- a/libavformat/avisynth.c
>> +++ b/libavformat/avisynth.c
>> @@ -244,7 +244,8 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
>>       AviSynthContext *avs = s->priv_data;
>>       const AVS_Map *avsmap;
>>       AVS_VideoFrame *frame;
>> -    int framedata, error;
>> +    int framedata = 0;
>> +    int error;
>>       int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA
>>   
>>       st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
> 
> Looking at the naming in
> https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/core/avisynth_c.cpp#L828
> makes me believe that this variable is actually a frame number. If so,
> it is misnamed and this could be fixed easily by just removing this
> variable. Am I right?
> 

It seems so.  I think I was just going off of the way avs_get_frame was 
used in avisynth_read_packet_video (as I was also trying to see whether 
some of the other properties* should be read per-frame from within 
read_packet_video), but there's no need to do that with the simpler ones 
in avisynth_create_stream_video.

*related to timestamps or to HDR mastering information, but I'm thinking 
that's going to require adding an entire function to the demuxer to be 
able to set side metadata (at least for the HDR stuff, anyway).
_______________________________________________
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:[~2022-02-20  0:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 11:02 [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson
2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 1/3] avisynth: corrected interlace detection Stephen Hutchinson
2022-02-13 23:33   ` Stephen Hutchinson
2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson
2022-02-13 23:34   ` Stephen Hutchinson
2022-02-19 20:39   ` Andreas Rheinhardt
2022-02-19 21:41     ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson
2022-02-19 21:41       ` [FFmpeg-devel] [PATCH 2/2] avformat/avisynth: make sure framedata variable is initialized Stephen Hutchinson
2022-02-19 22:45         ` Andreas Rheinhardt
2022-02-20  0:05           ` Stephen Hutchinson [this message]
2022-02-20  0:09             ` [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable Stephen Hutchinson
2022-02-23 18:04               ` Stephen Hutchinson
2022-02-23 18:03       ` [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop' Stephen Hutchinson
2022-02-19 21:45     ` [FFmpeg-devel] [PATCH 2/3] avisynth: use AviSynth+'s frame properties to set various fields Stephen Hutchinson
2022-08-24 17:04   ` Steinar Apalnes
2022-08-25  0:11     ` Stephen Hutchinson
2022-08-25  7:46       ` Steinar Apalnes
2022-09-04 19:14         ` Stephen Hutchinson
2022-02-08 11:02 ` [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version Stephen Hutchinson
2022-02-13 23:34   ` Stephen Hutchinson
2022-02-14 11:56     ` Gyan Doshi
2022-02-14 22:03       ` Stephen Hutchinson
2022-02-15 22:02         ` Helmut K. C. Tessarek
2022-02-15 23:55           ` Stephen Hutchinson
2022-02-16  1:33             ` Helmut K. C. Tessarek
2022-02-16  3:50               ` Stephen Hutchinson
2022-02-16  5:10                 ` Helmut K. C. Tessarek
2022-02-16  7:37                   ` Stephen Hutchinson
2022-02-16 18:25                     ` Helmut K. C. Tessarek
2022-02-16 23:04                       ` hydra3333
2022-02-16 23:13                         ` Helmut K. C. Tessarek
2022-02-17  0:55                       ` Stephen Hutchinson
2022-02-17 22:19                         ` Helmut K. C. Tessarek
2022-02-18  0:21                           ` Stephen Hutchinson
2022-02-13 17:48 ` [FFmpeg-devel] [PATCH 0/3] avformat/avisynth: support frame properties Stephen Hutchinson

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=041a5df3-7ede-9e4b-f77b-b0a5e9346ed2@gmail.com \
    --to=qyot27@gmail.com \
    --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