[FFmpeg-devel] FFmpeg A/V filtering questions
Clément Bœsch
ubitux at gmail.com
Mon Feb 13 23:33:48 CET 2012
On Mon, Feb 13, 2012 at 08:14:43PM +0100, Michael Niedermayer wrote:
> On Mon, Feb 13, 2012 at 04:15:12PM +0100, Clément Bœsch wrote:
> > Hi,
> >
> > I have a few questions about this part of the code in ffmpeg.c (around L2140):
> >
> > avcodec_get_frame_defaults(ist->filtered_frame);
> > filtered_frame = ist->filtered_frame;
> > *filtered_frame= *decoded_frame; //for me_threshold
> > if (ost->picref) {
> > avfilter_fill_frame_from_video_buffer_ref(filtered_frame, ost->picref);
> > filtered_frame->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);
> > }
> > if (ost->picref->video && !ost->frame_aspect_ratio)
> > ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio;
> > do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame);
> >
> > 1) how is *filtered_frame = *decoded_frame (only?) related to me_threshold?
>
> copying the motion vectors & macroblock types
>
>
> >
> > 2) what is the point of getting the frame defaults if they are overwritten just
> > after that (first 3 lines)?
>
> theres no point
>
>
> >
> > 3) ost->picref can't be changed in the "if (ost->picref)" scope, so it looks
> > like to me that "if (ost->picref->video)" will leads to a sigsegv if
> > ost->picref was NULL in the first place. Since no such bug exists at
> > the moment (AFAIK), couldn't we just drop the "if (ost->picref)" block?
>
> yes
>
Thank you for your answers, I just sent a related patchset.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120213/7921eb7e/attachment.asc>
More information about the ffmpeg-devel
mailing list