diff mbox

[FFmpeg-devel,09/27] avcodec/fraps: replace YUVJ pixel format

Message ID 20171209153819.19007-9-onemda@gmail.com
State Superseded
Headers show

Commit Message

Paul B Mahol Dec. 9, 2017, 3:38 p.m. UTC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/fraps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Dec. 10, 2017, 12:01 a.m. UTC | #1
On Sat, Dec 09, 2017 at 04:38:01PM +0100, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavcodec/fraps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

breaks

./ffmpeg -y -i tickets/2593/fraps_flv1_decoding_errors.avi -t 1 file.nut

should be here:
https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi

[...]
Paul B Mahol Dec. 10, 2017, 10:25 a.m. UTC | #2
On 12/10/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
> On Sat, Dec 09, 2017 at 04:38:01PM +0100, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>> ---
>>  libavcodec/fraps.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> breaks
>
> ./ffmpeg -y -i tickets/2593/fraps_flv1_decoding_errors.avi -t 1 file.nut
>
> should be here:
> https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi

Is that again mpeg4 encoder?

Does mpeg4 encoder supports only MPEG color range?
Michael Niedermayer Dec. 10, 2017, 10:44 a.m. UTC | #3
On Sun, Dec 10, 2017 at 11:25:41AM +0100, Paul B Mahol wrote:
> On 12/10/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
> > On Sat, Dec 09, 2017 at 04:38:01PM +0100, Paul B Mahol wrote:
> >> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> >> ---
> >>  libavcodec/fraps.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > breaks
> >
> > ./ffmpeg -y -i tickets/2593/fraps_flv1_decoding_errors.avi -t 1 file.nut
> >
> > should be here:
> > https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi
> 
> Is that again mpeg4 encoder?

yes


> 
> Does mpeg4 encoder supports only MPEG color range?

the standard supports both but i think our encoder doesnt write the
header that signals it

[...]
Paul B Mahol Dec. 10, 2017, 10:47 a.m. UTC | #4
On 12/10/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
> On Sun, Dec 10, 2017 at 11:25:41AM +0100, Paul B Mahol wrote:
>> On 12/10/17, Michael Niedermayer <michael@niedermayer.cc> wrote:
>> > On Sat, Dec 09, 2017 at 04:38:01PM +0100, Paul B Mahol wrote:
>> >> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>> >> ---
>> >>  libavcodec/fraps.c | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > breaks
>> >
>> > ./ffmpeg -y -i tickets/2593/fraps_flv1_decoding_errors.avi -t 1
>> > file.nut
>> >
>> > should be here:
>> > https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2593/fraps_flv1_decoding_errors.avi
>>
>> Is that again mpeg4 encoder?
>
> yes
>
>
>>
>> Does mpeg4 encoder supports only MPEG color range?
>
> the standard supports both but i think our encoder doesnt write the
> header that signals it

That would be strange, as color_range is not exported by decoder at all.
diff mbox

Patch

diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 7a7673f73f..b2025b5d3f 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -218,7 +218,7 @@  static int decode_frame(AVCodecContext *avctx,
     f->pict_type = AV_PICTURE_TYPE_I;
     f->key_frame = 1;
 
-    avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P;
+    avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUV420P;
     avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED
                                      : AVCOL_RANGE_JPEG;
     avctx->colorspace = version & 1 ? AVCOL_SPC_UNSPECIFIED : AVCOL_SPC_BT709;