{"sha":"01770bfda02a72dc4c721e5cbd66ffa47b37002d","node_id":"MDY6Q29tbWl0MTYxNDQxMDowMTc3MGJmZGEwMmE3MmRjNGM3MjFlNWNiZDY2ZmZhNDdiMzcwMDJk","commit":{"author":{"name":"Michael Niedermayer","email":"michael@niedermayer.cc","date":"2015-09-20T20:55:15Z"},"committer":{"name":"Michael Niedermayer","email":"michael@niedermayer.cc","date":"2015-09-20T21:26:39Z"},"message":"avcodec/snowenc: Do not write into const AVFrame\n\nSigned-off-by: Michael Niedermayer <michael@niedermayer.cc>","tree":{"sha":"22a2e45dae3455fb6ed9458b95374b4136c2a493","url":"https://api.github.com/repos/FFmpeg/FFmpeg/git/trees/22a2e45dae3455fb6ed9458b95374b4136c2a493"},"url":"https://api.github.com/repos/FFmpeg/FFmpeg/git/commits/01770bfda02a72dc4c721e5cbd66ffa47b37002d","comment_count":0,"verification":{"verified":false,"reason":"unsigned","signature":null,"payload":null,"verified_at":null}},"url":"https://api.github.com/repos/FFmpeg/FFmpeg/commits/01770bfda02a72dc4c721e5cbd66ffa47b37002d","html_url":"https://github.com/FFmpeg/FFmpeg/commit/01770bfda02a72dc4c721e5cbd66ffa47b37002d","comments_url":"https://api.github.com/repos/FFmpeg/FFmpeg/commits/01770bfda02a72dc4c721e5cbd66ffa47b37002d/comments","author":{"login":"michaelni","id":729390,"node_id":"MDQ6VXNlcjcyOTM5MA==","avatar_url":"https://avatars.githubusercontent.com/u/729390?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelni","html_url":"https://github.com/michaelni","followers_url":"https://api.github.com/users/michaelni/followers","following_url":"https://api.github.com/users/michaelni/following{/other_user}","gists_url":"https://api.github.com/users/michaelni/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelni/subscriptions","organizations_url":"https://api.github.com/users/michaelni/orgs","repos_url":"https://api.github.com/users/michaelni/repos","events_url":"https://api.github.com/users/michaelni/events{/privacy}","received_events_url":"https://api.github.com/users/michaelni/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"michaelni","id":729390,"node_id":"MDQ6VXNlcjcyOTM5MA==","avatar_url":"https://avatars.githubusercontent.com/u/729390?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelni","html_url":"https://github.com/michaelni","followers_url":"https://api.github.com/users/michaelni/followers","following_url":"https://api.github.com/users/michaelni/following{/other_user}","gists_url":"https://api.github.com/users/michaelni/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelni/subscriptions","organizations_url":"https://api.github.com/users/michaelni/orgs","repos_url":"https://api.github.com/users/michaelni/repos","events_url":"https://api.github.com/users/michaelni/events{/privacy}","received_events_url":"https://api.github.com/users/michaelni/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"55b803e33ede35318f6afeadbe13fbb082eaaf20","url":"https://api.github.com/repos/FFmpeg/FFmpeg/commits/55b803e33ede35318f6afeadbe13fbb082eaaf20","html_url":"https://github.com/FFmpeg/FFmpeg/commit/55b803e33ede35318f6afeadbe13fbb082eaaf20"}],"stats":{"total":9,"additions":6,"deletions":3},"files":[{"sha":"1f22ad55d105bb51e91070c35cbaed04b2de587c","filename":"libavcodec/snowenc.c","status":"modified","additions":6,"deletions":3,"changes":9,"blob_url":"https://github.com/FFmpeg/FFmpeg/blob/01770bfda02a72dc4c721e5cbd66ffa47b37002d/libavcodec%2Fsnowenc.c","raw_url":"https://github.com/FFmpeg/FFmpeg/raw/01770bfda02a72dc4c721e5cbd66ffa47b37002d/libavcodec%2Fsnowenc.c","contents_url":"https://api.github.com/repos/FFmpeg/FFmpeg/contents/libavcodec%2Fsnowenc.c?ref=01770bfda02a72dc4c721e5cbd66ffa47b37002d","patch":"@@ -1557,7 +1557,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,\n {\n     SnowContext *s = avctx->priv_data;\n     RangeCoder * const c= &s->c;\n-    AVFrame *pic = pict;\n+    AVFrame *pic;\n     const int width= s->avctx->width;\n     const int height= s->avctx->height;\n     int level, orientation, plane_index, i, y, ret;\n@@ -1584,6 +1584,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,\n \n     }\n     emms_c();\n+    pic = s->input_picture;\n+    pic->pict_type = pict->pict_type;\n+    pic->quality = pict->quality;\n \n     s->m.picture_number= avctx->frame_number;\n     if(avctx->flags&AV_CODEC_FLAG_PASS2){\n@@ -1844,8 +1847,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,\n     ff_snow_release_buffer(avctx);\n \n     s->current_picture->coded_picture_number = avctx->frame_number;\n-    s->current_picture->pict_type = pict->pict_type;\n-    s->current_picture->quality = pict->quality;\n+    s->current_picture->pict_type = pic->pict_type;\n+    s->current_picture->quality = pic->quality;\n     s->m.frame_bits = 8*(s->c.bytestream - s->c.bytestream_start);\n     s->m.p_tex_bits = s->m.frame_bits - s->m.misc_bits - s->m.mv_bits;\n     s->m.current_picture.f->display_picture_number ="}]}