mirror of https://github.com/mpv-player/mpv
cosmetics: av_sub
cosmetics: Break some long lines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32164 b3059339-0415-0410-9bf9-f77b7e298cf2 cosmetics: Add #endif comment. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32165 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
be67d71493
commit
0feeb9a000
6
av_sub.c
6
av_sub.c
|
@ -35,7 +35,8 @@ void reset_avsub(struct sh_sub *sh)
|
|||
* Decode a subtitle packet via libavcodec.
|
||||
* \return < 0 on error, > 0 if further processing is needed
|
||||
*/
|
||||
int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, double *endpts)
|
||||
int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size,
|
||||
double *pts, double *endpts)
|
||||
{
|
||||
AVCodecContext *ctx = sh->context;
|
||||
enum CodecID cid = CODEC_ID_NONE;
|
||||
|
@ -67,7 +68,8 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, doub
|
|||
ctx = avcodec_alloc_context();
|
||||
sub_codec = avcodec_find_decoder(cid);
|
||||
if (!ctx || !sub_codec || avcodec_open(ctx, sub_codec) < 0) {
|
||||
mp_msg(MSGT_SUBREADER, MSGL_FATAL, "Could not open subtitle decoder\n");
|
||||
mp_msg(MSGT_SUBREADER, MSGL_FATAL,
|
||||
"Could not open subtitle decoder\n");
|
||||
av_freep(&ctx);
|
||||
return -1;
|
||||
}
|
||||
|
|
5
av_sub.h
5
av_sub.h
|
@ -24,6 +24,7 @@
|
|||
struct sh_sub;
|
||||
|
||||
void reset_avsub(struct sh_sub *sh);
|
||||
int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, double *endpts);
|
||||
int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size,
|
||||
double *pts, double *endpts);
|
||||
|
||||
#endif
|
||||
#endif /* MPLAYER_AV_SUB_H */
|
||||
|
|
Loading…
Reference in New Issue