Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-13 Thread James Almer
On 4/13/2018 3:59 PM, Michael Niedermayer wrote: > On Thu, Apr 12, 2018 at 03:34:29PM -0300, James Almer wrote: >> If the parser returns full frames, then the output pointer retured by >> av_parser_parse2() is guaranteed to point to data contained in the >> input packet's buffer. >> >> Create a new

Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-13 Thread Michael Niedermayer
On Thu, Apr 12, 2018 at 03:34:29PM -0300, James Almer wrote: > If the parser returns full frames, then the output pointer retured by > av_parser_parse2() is guaranteed to point to data contained in the > input packet's buffer. > > Create a new reference to said buffer in that case, to avoid > unne

Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-12 Thread Hendrik Leppkes
On Thu, Apr 12, 2018 at 11:52 PM, wm4 wrote: > > Could we use that PARSE_HEADERS probably never changes packet contents? Not without reviewing all parsers, its not enforced, just a usage hint really. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-12 Thread James Almer
On 4/12/2018 6:52 PM, wm4 wrote: > On Thu, 12 Apr 2018 16:22:01 -0300 > James Almer wrote: > >> On 4/12/2018 3:59 PM, wm4 wrote: >>> On Thu, 12 Apr 2018 15:34:29 -0300 >>> James Almer wrote: >>> If the parser returns full frames, then the output pointer retured by av_parser_parse2()

Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-12 Thread wm4
On Thu, 12 Apr 2018 16:22:01 -0300 James Almer wrote: > On 4/12/2018 3:59 PM, wm4 wrote: > > On Thu, 12 Apr 2018 15:34:29 -0300 > > James Almer wrote: > > > >> If the parser returns full frames, then the output pointer retured by > >> av_parser_parse2() is guaranteed to point to data containe

Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-12 Thread James Almer
On 4/12/2018 3:59 PM, wm4 wrote: > On Thu, 12 Apr 2018 15:34:29 -0300 > James Almer wrote: > >> If the parser returns full frames, then the output pointer retured by >> av_parser_parse2() is guaranteed to point to data contained in the >> input packet's buffer. >> >> Create a new reference to sai

Re: [FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-12 Thread wm4
On Thu, 12 Apr 2018 15:34:29 -0300 James Almer wrote: > If the parser returns full frames, then the output pointer retured by > av_parser_parse2() is guaranteed to point to data contained in the > input packet's buffer. > > Create a new reference to said buffer in that case, to avoid > unnecessa

[FFmpeg-devel] [PATCH] avformat/utils: use the existing packet reference when parsing complete frames

2018-04-12 Thread James Almer
If the parser returns full frames, then the output pointer retured by av_parser_parse2() is guaranteed to point to data contained in the input packet's buffer. Create a new reference to said buffer in that case, to avoid unnecessary data copy when queueing the packet later in the function. Signed