Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-24 Thread Michael Niedermayer
On Wed, Jun 24, 2015 at 07:21:07PM +0300, Ludmila Glinskih wrote: > Result differs in pkt_duration and time_base.den for some reason. > Right now it tests only one example (adjusted to match the output). > > Signed-off-by: Ludmila Glinskih [...] > +printf("%d, %10"PRId64", %10"P

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-24 Thread Ronald S. Bultje
Hi, On Wed, Jun 24, 2015 at 11:45 AM, Ludmila Glinskih wrote: > вт, 23 июня 2015 г. в 16:21, Ronald S. Bultje : > > On Tue, Jun 23, 2015 at 9:05 AM, Ludmila Glinskih > > wrote: > > > > > +do { > > > +if (pkt.stream_index != video_stream) > > > +break; > > > > > > That ch

[FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-24 Thread Ludmila Glinskih
Result differs in pkt_duration and time_base.den for some reason. Right now it tests only one example (adjusted to match the output). Signed-off-by: Ludmila Glinskih --- libavformat/Makefile| 1 + libavformat/api-h264-test.c | 183 tests/fat

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-24 Thread Ludmila Glinskih
Hi! вт, 23 июня 2015 г. в 16:21, Ronald S. Bultje : > Hi, > > On Tue, Jun 23, 2015 at 9:05 AM, Ludmila Glinskih > wrote: > > > +do { > > +if (pkt.stream_index != video_stream) > > +break; > > > That check shouldn't be necessary for the last frame. Sorry for missing > that

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-23 Thread Michael Niedermayer
On Tue, Jun 23, 2015 at 01:56:57PM +, Ludmila Glinskih wrote: > Do you have any ideas why it differs from framecrc result on the same file? [...] > > --- /dev/null > > +++ b/tests/ref/fate/api-h264 > > @@ -0,0 +1,18 @@ > > +#tb 0: 1/120 the timebase and timestamps differ as ffmpeg*.c does

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-23 Thread Ludmila Glinskih
Do you have any ideas why it differs from framecrc result on the same file? пн, 22 июня 2015 г. в 12:50, Ludmila Glinskih : > Result differs in pkt_duration and time_base.den for some reason. > Right now it tests only one example (adjusted to match the output). > > Signed-off-by: Ludmila Glinskih

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-23 Thread Ronald S. Bultje
Hi, On Tue, Jun 23, 2015 at 9:27 AM, wm4 wrote: > On Tue, 23 Jun 2015 16:05:38 +0300 > Ludmila Glinskih wrote: > > > Result differs in pkt_duration and time_base.den for some reason. > > Right now it tests only one example (adjusted to match the output). > > > > Signed-off-by: Ludmila Glinskih

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-23 Thread wm4
On Tue, 23 Jun 2015 16:05:38 +0300 Ludmila Glinskih wrote: > Result differs in pkt_duration and time_base.den for some reason. > Right now it tests only one example (adjusted to match the output). > > Signed-off-by: Ludmila Glinskih > --- > libavformat/Makefile| 1 + > libavformat/ap

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-23 Thread Ronald S. Bultje
Hi, On Tue, Jun 23, 2015 at 9:05 AM, Ludmila Glinskih wrote: > +do { > +if (pkt.stream_index != video_stream) > +break; That check shouldn't be necessary for the last frame. Sorry for missing that on the first iteration. Ronald _

[FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-23 Thread Ludmila Glinskih
Result differs in pkt_duration and time_base.den for some reason. Right now it tests only one example (adjusted to match the output). Signed-off-by: Ludmila Glinskih --- libavformat/Makefile| 1 + libavformat/api-h264-test.c | 187 tests/fat

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Vittorio Giovara
On Mon, Jun 22, 2015 at 2:50 PM, Derek Buitenhuis wrote: > On 6/22/2015 2:46 PM, Vittorio Giovara wrote: >> afaik in POSIX any non zero value is to be considered an error, also >> because value ranges on an unsigned byte. > > -1 ends up greater than 128, which is reserved by POSIX for system > sig

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Derek Buitenhuis
On 6/22/2015 2:46 PM, Vittorio Giovara wrote: > afaik in POSIX any non zero value is to be considered an error, also > because value ranges on an unsigned byte. -1 ends up greater than 128, which is reserved by POSIX for system signal info (SIGKILL and pals). - Derek _

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Vittorio Giovara
On Mon, Jun 22, 2015 at 1:40 PM, Derek Buitenhuis wrote: > On 6/22/2015 1:32 PM, Vittorio Giovara wrote: >> video_decode_example can return -1 on error, and this is lost, so >> you'd better do "return video_decode_example(argv[1]);" to return the >> value to the caller. Also sometimes you exit(1)

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Ronald S. Bultje
Hi, On Mon, Jun 22, 2015 at 5:50 AM, Ludmila Glinskih wrote: > +if (avcodec_decode_video2(ctx, fr, &get_frame, &pkt) < 0 || > get_frame == 0) > +flag = 1; > +if (get_frame) { > This sounds like you want if (avcodec_decode_video2(..) >= 0 && get_frame > 0) {. You can

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Derek Buitenhuis
On 6/22/2015 1:32 PM, Vittorio Giovara wrote: > video_decode_example can return -1 on error, and this is lost, so > you'd better do "return video_decode_example(argv[1]);" to return the > value to the caller. Also sometimes you exit(1) and sometimes you > return -1, maybe you could go with only one

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Vittorio Giovara
On Mon, Jun 22, 2015 at 10:50 AM, Ludmila Glinskih wrote: > +static int video_decode_example(const char *input_filename) > +{ > +AVCodec *codec = NULL; > +AVCodecContext *origin_ctx = NULL, *ctx= NULL; > +AVFrame *fr = NULL; > +uint8_t *byte_buffer = NULL; > +AVPacket pkt; > +

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Derek Buitenhuis
On 6/22/2015 10:50 AM, Ludmila Glinskih wrote: > +#include "libavformat/internal.h" What is this for? - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Michael Niedermayer
On Mon, Jun 22, 2015 at 12:50:22PM +0300, Ludmila Glinskih wrote: > Result differs in pkt_duration and time_base.den for some reason. > Right now it tests only one example (adjusted to match the output). > [...] > +pkt.data = NULL; > +pkt.size = 0; > +if (pkt.pts == AV_NOPTS_VALUE) >

Re: [FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Michael Niedermayer
On Mon, Jun 22, 2015 at 12:50:21PM +0300, Ludmila Glinskih wrote: > I really don't know how to avoid warnings in printf. in: libavformat/api-h264-test.c: In function ‘video_decode_example’: libavformat/api-h264-test.c:113:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has

[FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Ludmila Glinskih
Result differs in pkt_duration and time_base.den for some reason. Right now it tests only one example (adjusted to match the output). Signed-off-by: Ludmila Glinskih --- libavformat/Makefile| 1 + libavformat/api-h264-test.c | 155 tests/fat

[FFmpeg-devel] [PATCH] libavformat: Add H264 API test

2015-06-22 Thread Ludmila Glinskih
I really don't know how to avoid warnings in printf. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel