# HG changeset patch # User michael # Date 1099956992 0 # Node ID d9c9b42767dabff939b4a536f4a527d6f23b3d68 # Parent a2073e67cb19adae58b7e88bc80f3685dcea9147 fix image stream copy diff -r a2073e67cb19 -r d9c9b42767da avcodec.h --- a/avcodec.h Sat Nov 06 19:11:34 2004 +0000 +++ b/avcodec.h Mon Nov 08 23:36:32 2004 +0000 @@ -17,7 +17,7 @@ #define FFMPEG_VERSION_INT 0x000409 #define FFMPEG_VERSION "0.4.9-pre1" -#define LIBAVCODEC_BUILD 4728 +#define LIBAVCODEC_BUILD 4729 #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT #define LIBAVCODEC_VERSION FFMPEG_VERSION @@ -1996,6 +1996,7 @@ const char *avcodec_get_pix_fmt_name(int pix_fmt); void avcodec_set_dimensions(AVCodecContext *s, int width, int height); enum PixelFormat avcodec_get_pix_fmt(const char* name); +unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat p); #define FF_LOSS_RESOLUTION 0x0001 /* loss due to resolution change */ #define FF_LOSS_DEPTH 0x0002 /* loss due to color depth change */ diff -r a2073e67cb19 -r d9c9b42767da raw.c --- a/raw.c Sat Nov 06 19:11:34 2004 +0000 +++ b/raw.c Mon Nov 08 23:36:32 2004 +0000 @@ -64,7 +64,7 @@ return PIX_FMT_YUV420P; } -static unsigned int findFourCC(int fmt) +unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat fmt) { const PixelFormatTag * tags = pixelFormatTags; while (tags->pix_fmt >= 0) { @@ -152,7 +152,7 @@ avctx->coded_frame->pict_type = FF_I_TYPE; avctx->coded_frame->key_frame = 1; if(!avctx->codec_tag) - avctx->codec_tag = findFourCC(avctx->pix_fmt); + avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt); return 0; }