blob: 7215500b3d84380c7feaab20149956bbbc972204 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 9a98d133ad7da1db84447183ec3f311b825c0407 Mon Sep 17 00:00:00 2001
From: Antony Dovgal <tony@daylessday.org>
Date: Sun, 5 May 2013 23:07:23 +0400
Subject: [PATCH] fix issue #4 (sub_id was removed from decoder struct)
---
ffmpeg_movie.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ffmpeg_movie.c b/ffmpeg_movie.c
index 9c30dac..ef9987c 100644
--- a/ffmpeg_movie.c
+++ b/ffmpeg_movie.c
@@ -39,6 +39,7 @@
#include "ext/standard/info.h"
#include <libavcodec/avcodec.h>
+#include <libavcodec/version.h>
#include <libavformat/avformat.h>
#include <libavutil/pixfmt.h>
#include <libavutil/pixdesc.h>
@@ -966,12 +967,14 @@ static const char* _php_get_codec_name(ff_movie_context *ffmovie_ctx, int type)
/* Copied from libavcodec/utils.c::avcodec_string */
if (p) {
codec_name = p->name;
+#ifdef FF_API_SUB_ID
if (decoder_ctx->codec_id == CODEC_ID_MP3) {
if (decoder_ctx->sub_id == 2)
codec_name = "mp2";
else if (decoder_ctx->sub_id == 1)
codec_name = "mp1";
}
+#endif
} else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
/* fake mpeg2 transport stream codec (currently not registered) */
codec_name = "mpeg2ts";
--
1.9.1
|