Mercurial > mplayer.hg
comparison gui/bitmap.c @ 23526:cdf3ba9e5b97
Fix compilation after FFmpeg r9283.
author | cehoyos |
---|---|
date | Tue, 12 Jun 2007 08:38:42 +0000 |
parents | 4b313fe708be |
children | 1318e956c092 |
comparison
equal
deleted
inserted
replaced
23525:37ef65c09ac6 | 23526:cdf3ba9e5b97 |
---|---|
35 fseek(fp, 0, SEEK_SET); | 35 fseek(fp, 0, SEEK_SET); |
36 fread(data, len, 1, fp); | 36 fread(data, len, 1, fp); |
37 fclose(fp); | 37 fclose(fp); |
38 avctx = avcodec_alloc_context(); | 38 avctx = avcodec_alloc_context(); |
39 frame = avcodec_alloc_frame(); | 39 frame = avcodec_alloc_frame(); |
40 avcodec_open(avctx, &png_decoder); | 40 avcodec_register_all(); |
41 avcodec_open(avctx, avcodec_find_decoder(CODEC_ID_PNG)); | |
41 avcodec_decode_video(avctx, frame, &decode_ok, data, len); | 42 avcodec_decode_video(avctx, frame, &decode_ok, data, len); |
42 memset(bf, 0, sizeof(*bf)); | 43 memset(bf, 0, sizeof(*bf)); |
43 switch (avctx->pix_fmt) { | 44 switch (avctx->pix_fmt) { |
44 case PIX_FMT_GRAY8: bf->BPP = 8; break; | 45 case PIX_FMT_GRAY8: bf->BPP = 8; break; |
45 case PIX_FMT_GRAY16BE: bf->BPP = 16; break; | 46 case PIX_FMT_GRAY16BE: bf->BPP = 16; break; |